aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/dbell.c22
-rw-r--r--arch/powerpc/kernel/traps.c21
2 files changed, 21 insertions, 22 deletions
diff --git a/arch/powerpc/kernel/dbell.c b/arch/powerpc/kernel/dbell.c
index 1493734cd871..e3a717704fd6 100644
--- a/arch/powerpc/kernel/dbell.c
+++ b/arch/powerpc/kernel/dbell.c
@@ -41,4 +41,24 @@ void smp_dbell_message_pass(int target, int msg)
41 ppc_msgsnd(PPC_DBELL, PPC_DBELL_MSG_BRDCAST, 0); 41 ppc_msgsnd(PPC_DBELL, PPC_DBELL_MSG_BRDCAST, 0);
42 } 42 }
43} 43}
44#endif 44
45void doorbell_exception(struct pt_regs *regs)
46{
47 int cpu = smp_processor_id();
48 int msg;
49
50 if (num_online_cpus() < 2)
51 return;
52
53 for (msg = 0; msg < 4; msg++)
54 if (test_and_clear_bit(msg, &dbell_smp_message[cpu]))
55 smp_message_recv(msg);
56}
57
58#else /* CONFIG_SMP */
59void doorbell_exception(struct pt_regs *regs)
60{
61 printk(KERN_WARNING "Received doorbell on non-smp system\n");
62}
63#endif /* CONFIG_SMP */
64
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index e5fe5a8522a6..a45a63c3a0c7 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -55,9 +55,6 @@
55#endif 55#endif
56#include <asm/kexec.h> 56#include <asm/kexec.h>
57#include <asm/ppc-opcode.h> 57#include <asm/ppc-opcode.h>
58#ifdef CONFIG_FSL_BOOKE
59#include <asm/dbell.h>
60#endif
61 58
62#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) 59#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
63int (*__debugger)(struct pt_regs *regs) __read_mostly; 60int (*__debugger)(struct pt_regs *regs) __read_mostly;
@@ -1342,24 +1339,6 @@ void vsx_assist_exception(struct pt_regs *regs)
1342#endif /* CONFIG_VSX */ 1339#endif /* CONFIG_VSX */
1343 1340
1344#ifdef CONFIG_FSL_BOOKE 1341#ifdef CONFIG_FSL_BOOKE
1345
1346void doorbell_exception(struct pt_regs *regs)
1347{
1348#ifdef CONFIG_SMP
1349 int cpu = smp_processor_id();
1350 int msg;
1351
1352 if (num_online_cpus() < 2)
1353 return;
1354
1355 for (msg = 0; msg < 4; msg++)
1356 if (test_and_clear_bit(msg, &dbell_smp_message[cpu]))
1357 smp_message_recv(msg);
1358#else
1359 printk(KERN_WARNING "Received doorbell on non-smp system\n");
1360#endif
1361}
1362
1363void CacheLockingException(struct pt_regs *regs, unsigned long address, 1342void CacheLockingException(struct pt_regs *regs, unsigned long address,
1364 unsigned long error_code) 1343 unsigned long error_code)
1365{ 1344{