Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] ppc: Fix ARCH=ppc build with xmon

xmon() prototype is inconsistent between ARCH=ppc and ARCH=powerpc,
thus causing ARCH=ppc build breakage.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Benjamin Herrenschmidt and committed by
Paul Mackerras
7b007de8 21fe3301

+6 -5
+2 -2
arch/ppc/kernel/traps.c
··· 49 49 extern int xmon_iabr_match(struct pt_regs *regs); 50 50 extern int xmon_dabr_match(struct pt_regs *regs); 51 51 52 - void (*debugger)(struct pt_regs *regs) = xmon; 52 + int (*debugger)(struct pt_regs *regs) = xmon; 53 53 int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt; 54 54 int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep; 55 55 int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match; ··· 57 57 void (*debugger_fault_handler)(struct pt_regs *regs); 58 58 #else 59 59 #ifdef CONFIG_KGDB 60 - void (*debugger)(struct pt_regs *regs); 60 + int (*debugger)(struct pt_regs *regs); 61 61 int (*debugger_bpt)(struct pt_regs *regs); 62 62 int (*debugger_sstep)(struct pt_regs *regs); 63 63 int (*debugger_iabr_match)(struct pt_regs *regs);
+3 -2
arch/ppc/xmon/xmon.c
··· 220 220 p[1] = lo; 221 221 } 222 222 223 - void 224 - xmon(struct pt_regs *excp) 223 + int xmon(struct pt_regs *excp) 225 224 { 226 225 struct pt_regs regs; 227 226 int msr, cmd; ··· 289 290 #endif /* CONFIG_SMP */ 290 291 set_msr(msr); /* restore interrupt enable */ 291 292 get_tb(start_tb[smp_processor_id()]); 293 + 294 + return cmd != 'X'; 292 295 } 293 296 294 297 irqreturn_t
+1 -1
include/asm-ppc/kgdb.h
··· 31 31 /* For taking exceptions 32 32 * these are defined in traps.c 33 33 */ 34 - extern void (*debugger)(struct pt_regs *regs); 34 + extern int (*debugger)(struct pt_regs *regs); 35 35 extern int (*debugger_bpt)(struct pt_regs *regs); 36 36 extern int (*debugger_sstep)(struct pt_regs *regs); 37 37 extern int (*debugger_iabr_match)(struct pt_regs *regs);