diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-11-22 18:46:45 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 04:40:32 -0500 |
commit | e0426047cb684842700f0098f74842a38260dbae (patch) | |
tree | eec4033ad96e019dbb4e00863c3e03ca6c3ae090 /arch/powerpc/xmon/xmon.c | |
parent | af89fb8041562508895c8f3ba04790d7c2f4338c (diff) |
[POWERPC] Make xmon disassembly optional
While adding spu disassembly support it struck me that we're actually
carrying quite a lot of code around, just to do disassembly in the case
of a crash.
While on large systems it's not an issue, on smaller ones it might be
nice to have xmon - but without the weight of the disassembly support.
For a Cell build this saves ~230KB (!), and for pSeries ~195KB.
We still support the 'di' and 'sdi' commands, however they just dump
the instruction in hex.
Move the definitions into a header to clean xmon.c just a tiny bit.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/xmon/xmon.c')
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 7a0eec23cb9c..c999638cc2de 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #include "nonstdio.h" | 49 | #include "nonstdio.h" |
50 | #include "dis-asm.h" | ||
50 | 51 | ||
51 | #define scanhex xmon_scanhex | 52 | #define scanhex xmon_scanhex |
52 | #define skipbl xmon_skipbl | 53 | #define skipbl xmon_skipbl |
@@ -110,7 +111,6 @@ static int bsesc(void); | |||
110 | static void dump(void); | 111 | static void dump(void); |
111 | static void prdump(unsigned long, long); | 112 | static void prdump(unsigned long, long); |
112 | static int ppc_inst_dump(unsigned long, long, int); | 113 | static int ppc_inst_dump(unsigned long, long, int); |
113 | void print_address(unsigned long); | ||
114 | static void backtrace(struct pt_regs *); | 114 | static void backtrace(struct pt_regs *); |
115 | static void excprint(struct pt_regs *); | 115 | static void excprint(struct pt_regs *); |
116 | static void prregs(struct pt_regs *); | 116 | static void prregs(struct pt_regs *); |
@@ -154,9 +154,6 @@ static int do_spu_cmd(void); | |||
154 | 154 | ||
155 | int xmon_no_auto_backtrace; | 155 | int xmon_no_auto_backtrace; |
156 | 156 | ||
157 | extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr); | ||
158 | extern int print_insn_spu(unsigned long insn, unsigned long memaddr); | ||
159 | |||
160 | extern void xmon_enter(void); | 157 | extern void xmon_enter(void); |
161 | extern void xmon_leave(void); | 158 | extern void xmon_leave(void); |
162 | 159 | ||