aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dbell.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/dbell.c')
-rw-r--r--arch/powerpc/kernel/dbell.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/arch/powerpc/kernel/dbell.c b/arch/powerpc/kernel/dbell.c
index 3307a52d797f..e49b24c84133 100644
--- a/arch/powerpc/kernel/dbell.c
+++ b/arch/powerpc/kernel/dbell.c
@@ -34,32 +34,13 @@ void doorbell_setup_this_cpu(void)
34 info->tag = mfspr(SPRN_PIR) & 0x3fff; 34 info->tag = mfspr(SPRN_PIR) & 0x3fff;
35} 35}
36 36
37void doorbell_message_pass(int target, int msg) 37void doorbell_message_pass(int cpu, int msg)
38{ 38{
39 struct doorbell_cpu_info *info; 39 struct doorbell_cpu_info *info;
40 int i; 40
41 41 info = &per_cpu(doorbell_cpu_info, cpu);
42 if (target < NR_CPUS) { 42 set_bit(msg, &info->messages);
43 info = &per_cpu(doorbell_cpu_info, target); 43 ppc_msgsnd(PPC_DBELL, 0, info->tag);
44 set_bit(msg, &info->messages);
45 ppc_msgsnd(PPC_DBELL, 0, info->tag);
46 }
47 else if (target == MSG_ALL_BUT_SELF) {
48 for_each_online_cpu(i) {
49 if (i == smp_processor_id())
50 continue;
51 info = &per_cpu(doorbell_cpu_info, i);
52 set_bit(msg, &info->messages);
53 ppc_msgsnd(PPC_DBELL, 0, info->tag);
54 }
55 }
56 else { /* target == MSG_ALL */
57 for_each_online_cpu(i) {
58 info = &per_cpu(doorbell_cpu_info, i);
59 set_bit(msg, &info->messages);
60 }
61 ppc_msgsnd(PPC_DBELL, PPC_DBELL_MSG_BRDCAST, 0);
62 }
63} 44}
64 45
65void doorbell_exception(struct pt_regs *regs) 46void doorbell_exception(struct pt_regs *regs)