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/dis-asm.h | |
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/dis-asm.h')
-rw-r--r-- | arch/powerpc/xmon/dis-asm.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/dis-asm.h b/arch/powerpc/xmon/dis-asm.h new file mode 100644 index 000000000000..be3533b93f30 --- /dev/null +++ b/arch/powerpc/xmon/dis-asm.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _POWERPC_XMON_DIS_ASM_H | ||
2 | #define _POWERPC_XMON_DIS_ASM_H | ||
3 | /* | ||
4 | * Copyright (C) 2006 Michael Ellerman, IBM Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | extern void print_address (unsigned long memaddr); | ||
13 | |||
14 | #ifdef CONFIG_XMON_DISASSEMBLY | ||
15 | extern int print_insn_powerpc(unsigned long insn, unsigned long memaddr); | ||
16 | extern int print_insn_spu(unsigned long insn, unsigned long memaddr); | ||
17 | #else | ||
18 | static inline int print_insn_powerpc(unsigned long insn, unsigned long memaddr) | ||
19 | { | ||
20 | printf("%.8x", insn); | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | static inline int print_insn_spu(unsigned long insn, unsigned long memaddr) | ||
25 | { | ||
26 | printf("%.8x", insn); | ||
27 | return 0; | ||
28 | } | ||
29 | #endif | ||
30 | |||
31 | #endif /* _POWERPC_XMON_DIS_ASM_H */ | ||