aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2008-03-20 13:59:34 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-04-04 17:43:47 -0400
commite64a3cfcd929d093a2f076bcace9afa7ba5a2e32 (patch)
tree9129a2cff111066152a00898fa567ec9f2d844bb /arch/mips
parent865ab8753837b73fe1e800fc88462c5914eec549 (diff)
[MIPS] Make KGDB compile on UP
Building UP kernel with KGDB enabled produces the following errors and warning (fatal due to -Werror in arch/mips/kernel/Makefile): In file included from arch/mips/kernel/gdb-stub.c:142: include/asm/smp.h:25:1: "raw_smp_processor_id" redefined In file included from include/linux/sched.h:69, from arch/mips/kernel/gdb-stub.c:126: include/linux/smp.h:88:1: this is the location of the previous definition In file included from arch/mips/kernel/gdb-stub.c:142: include/asm/smp.h:62: error: redefinition of 'smp_send_reschedule' include/linux/smp.h:102: error: previous definition of 'smp_send_reschedule' was here include/asm/smp.h: In function `smp_send_reschedule': include/asm/smp.h:65: error: dereferencing pointer to incomplete type arch/mips/kernel/gdb-stub.c: At top level: arch/mips/kernel/gdb-stub.c:660: warning: 'kgdb_wait' defined but not used Fix the errors by not directly including <asm/smp.h> (which is already included by <linux/smp.h>) and the warning by enclosing kgdb_wait() in #ifdef CONFIG_SMP. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/gdb-stub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c
index 3191afa29ad8..25f4eab8ea9c 100644
--- a/arch/mips/kernel/gdb-stub.c
+++ b/arch/mips/kernel/gdb-stub.c
@@ -139,7 +139,6 @@
139#include <asm/system.h> 139#include <asm/system.h>
140#include <asm/gdb-stub.h> 140#include <asm/gdb-stub.h>
141#include <asm/inst.h> 141#include <asm/inst.h>
142#include <asm/smp.h>
143 142
144/* 143/*
145 * external low-level support routines 144 * external low-level support routines
@@ -656,6 +655,7 @@ void set_async_breakpoint(unsigned long *epc)
656 *epc = (unsigned long)async_breakpoint; 655 *epc = (unsigned long)async_breakpoint;
657} 656}
658 657
658#ifdef CONFIG_SMP
659static void kgdb_wait(void *arg) 659static void kgdb_wait(void *arg)
660{ 660{
661 unsigned flags; 661 unsigned flags;
@@ -668,6 +668,7 @@ static void kgdb_wait(void *arg)
668 668
669 local_irq_restore(flags); 669 local_irq_restore(flags);
670} 670}
671#endif
671 672
672/* 673/*
673 * GDB stub needs to call kgdb_wait on all processor with interrupts 674 * GDB stub needs to call kgdb_wait on all processor with interrupts