aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dbell.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-09 01:25:18 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-09 01:25:18 -0400
commite3145b387a02d4bf8b8033b1354d413fc0864494 (patch)
treef1d23c25022e097ee12d5ba9227a2dcf41eb2e44 /arch/powerpc/kernel/dbell.c
parenta2e198116f97bb1cd5b37ff33a8cfdfb4010cf5b (diff)
powerpc/book3e: Move doorbell_exception from traps.c to dbell.c
... where it belongs Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/dbell.c')
-rw-r--r--arch/powerpc/kernel/dbell.c22
1 files changed, 21 insertions, 1 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