aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 16:24:55 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 16:24:55 +0900
commit56e8d7b5786dc2f7d1f701500f8914fd2c52b111 (patch)
tree68654c185bdf5badbddd9698dd14bb0166b9270e /include/asm-sh
parent2549b3222f588c188674aed0b9a0ef78bbba5c6c (diff)
downloadkernel_samsung_aries-56e8d7b5786dc2f7d1f701500f8914fd2c52b111.zip
kernel_samsung_aries-56e8d7b5786dc2f7d1f701500f8914fd2c52b111.tar.gz
kernel_samsung_aries-56e8d7b5786dc2f7d1f701500f8914fd2c52b111.tar.bz2
sh: kgdb stub cleanups.
Some kgdb cleanup. Move hexchars/highhex/lowhex to the header, so it can be reused by sh-sci. Also drop silly ctrl_inl/outl() overloading being done by the kgdb stub. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/kgdb.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h
index 1653ffb..7b26f53 100644
--- a/include/asm-sh/kgdb.h
+++ b/include/asm-sh/kgdb.h
@@ -128,4 +128,19 @@ extern int setjmp(jmp_buf __jmpb);
#define KGDB_ASSERT(condition, message)
#endif
+/* Taken from sh-stub.c of GDB 4.18 */
+static const char hexchars[] = "0123456789abcdef";
+
+/* Get high hex bits */
+static inline char highhex(const int x)
+{
+ return hexchars[(x >> 4) & 0xf];
+}
+
+/* Get low hex bits */
+static inline char lowhex(const int x)
+{
+ return hexchars[x & 0xf];
+}
+
#endif