Skip to contentSkip to conversation

ppc: Fix ARCH=ppc build with xmon

PATCH New Benjamin Herrenschmidt 1 participant 1 message Nov 7, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc: Fix ARCH=ppc build with xmon

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

---
I'm not sure you already fixed that, so just in case...

arch/ppc/kernel/traps.c +2 -2
Index: linux-work/arch/ppc/kernel/traps.c
===================================================================
@@ -49,7 +49,7 @@
 extern int xmon_iabr_match(struct pt_regs *regs);
 extern int xmon_dabr_match(struct pt_regs *regs);
 
-void (*debugger)(struct pt_regs *regs) = xmon;
+int (*debugger)(struct pt_regs *regs) = xmon;
 int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt;
 int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep;
 int (*debugger_iabr_match)(struct pt_regs *regs) = xmon_iabr_match;
@@ -57,7 +57,7 @@
 void (*debugger_fault_handler)(struct pt_regs *regs);
 #else
 #ifdef CONFIG_KGDB
-void (*debugger)(struct pt_regs *regs);
+int (*debugger)(struct pt_regs *regs);
 int (*debugger_bpt)(struct pt_regs *regs);
 int (*debugger_sstep)(struct pt_regs *regs);
 int (*debugger_iabr_match)(struct pt_regs *regs);
arch/ppc/xmon/xmon.c +3 -2
Index: linux-work/arch/ppc/xmon/xmon.c
===================================================================
@@ -220,8 +220,7 @@
 	p[1] = lo;
 }
 
-void
-xmon(struct pt_regs *excp)
+int xmon(struct pt_regs *excp)
 {
 	struct pt_regs regs;
 	int msr, cmd;
@@ -290,6 +289,8 @@
 #endif /* CONFIG_SMP */
 	set_msr(msr);		/* restore interrupt enable */
 	get_tb(start_tb[smp_processor_id()]);
+
+	return cmd != 'X';
 }
 
 irqreturn_t
include/asm-ppc/kgdb.h +1 -1
Index: linux-work/include/asm-ppc/kgdb.h
===================================================================
@@ -31,7 +31,7 @@
 /* For taking exceptions
  * these are defined in traps.c
  */
-extern void (*debugger)(struct pt_regs *regs);
+extern int (*debugger)(struct pt_regs *regs);
 extern int (*debugger_bpt)(struct pt_regs *regs);
 extern int (*debugger_sstep)(struct pt_regs *regs);
 extern int (*debugger_iabr_match)(struct pt_regs *regs);