aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dbell.c
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2011-05-10 15:29:10 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-05-19 00:30:46 -0400
commitf1072939b6dd01d038d47db0bdc01b33e5f90f28 (patch)
tree281747826833d254131a44bad9c954659137a5a8 /arch/powerpc/kernel/dbell.c
parente04763713286b1e00e1c2a33fe2741caf9470f2b (diff)
powerpc: Remove checks for MSG_ALL and MSG_ALL_BUT_SELF
Now that smp_ops->smp_message_pass is always called with an (online) cpu number for the target remove the checks for MSG_ALL and MSG_ALL_BUT_SELF. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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)