Skip to content

Commit

Permalink
[POWERPC] Fix compilation for CONFIG_DEBUGGER=n and CONFIG_KEXEC=y
Browse files Browse the repository at this point in the history
Looks like "[POWERPC] kdump shutdown hook support" broke builds when
CONFIG_DEBUGGER=n and CONFIG_KEXEC=y, such as in g5_defconfig:

arch/powerpc/kernel/crash.c: In function 'default_machine_crash_shutdown':
arch/powerpc/kernel/crash.c:388: error: '__debugger_fault_handler' undeclared (first use in this function)
arch/powerpc/kernel/crash.c:388: error: (Each undeclared identifier is reported only once
arch/powerpc/kernel/crash.c:388: error: for each function it appears in.)

Move the debugger hooks to under CONFIG_DEBUGGER || CONFIG_KEXEC, since
that's when the crash code is enabled.

(I should have caught this with my build-script pre-merge, my bad. :( )

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Olof Johansson authored and Paul Mackerras committed Feb 7, 2008
1 parent 1f7d4f8 commit 7dbb922
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#endif
#include <asm/kexec.h>

#ifdef CONFIG_DEBUGGER
#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
int (*__debugger)(struct pt_regs *regs);
int (*__debugger_ipi)(struct pt_regs *regs);
int (*__debugger_bpt)(struct pt_regs *regs);
Expand Down
2 changes: 1 addition & 1 deletion include/asm-powerpc/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
struct task_struct;
struct pt_regs;

#ifdef CONFIG_DEBUGGER
#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)

extern int (*__debugger)(struct pt_regs *regs);
extern int (*__debugger_ipi)(struct pt_regs *regs);
Expand Down

0 comments on commit 7dbb922

Please sign in to comment.