[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>
This commit is contained in:
Michael Ellerman
2006-11-23 00:46:45 +01:00
committed by Paul Mackerras
parent af89fb8041
commit e0426047cb
6 changed files with 49 additions and 10 deletions

View File

@@ -47,6 +47,7 @@
#endif
#include "nonstdio.h"
#include "dis-asm.h"
#define scanhex xmon_scanhex
#define skipbl xmon_skipbl
@@ -110,7 +111,6 @@ static int bsesc(void);
static void dump(void);
static void prdump(unsigned long, long);
static int ppc_inst_dump(unsigned long, long, int);
void print_address(unsigned long);
static void backtrace(struct pt_regs *);
static void excprint(struct pt_regs *);
static void prregs(struct pt_regs *);
@@ -154,9 +154,6 @@ static int do_spu_cmd(void);
int xmon_no_auto_backtrace;
extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr);
extern int print_insn_spu(unsigned long insn, unsigned long memaddr);
extern void xmon_enter(void);
extern void xmon_leave(void);