aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2009-04-16 05:05:39 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-05-21 01:43:58 -0400
commitfb94fc2b89ea0422950cb1220f275622246bd66d (patch)
tree62bb3faf3793eea1ef187076a05907c02e12e6c0
parent14f966e79445015cd89d0fa0ceb6b33702e951b6 (diff)
powerpc/ps3: Use smp_request_message_ipi
ps3 has 4 ipis per cpu and can use the new smp_request_message_ipi to reduce path length when receiving an ipi. This has the side effect of setting IRQF_PERCPU. Signed-off-by: Milton Miller <miltonm@bga.com> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/platforms/ps3/smp.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
index a0927a3bacb7..f6e04bcc70ef 100644
--- a/arch/powerpc/platforms/ps3/smp.c
+++ b/arch/powerpc/platforms/ps3/smp.c
@@ -32,12 +32,6 @@
32#define DBG pr_debug 32#define DBG pr_debug
33#endif 33#endif
34 34
35static irqreturn_t ipi_function_handler(int irq, void *msg)
36{
37 smp_message_recv((int)(long)msg);
38 return IRQ_HANDLED;
39}
40
41/** 35/**
42 * ps3_ipi_virqs - a per cpu array of virqs for ipi use 36 * ps3_ipi_virqs - a per cpu array of virqs for ipi use
43 */ 37 */
@@ -45,13 +39,6 @@ static irqreturn_t ipi_function_handler(int irq, void *msg)
45#define MSG_COUNT 4 39#define MSG_COUNT 4
46static DEFINE_PER_CPU(unsigned int, ps3_ipi_virqs[MSG_COUNT]); 40static DEFINE_PER_CPU(unsigned int, ps3_ipi_virqs[MSG_COUNT]);
47 41
48static const char *names[MSG_COUNT] = {
49 "ipi call",
50 "ipi reschedule",
51 "ipi migrate",
52 "ipi debug brk"
53};
54
55static void do_message_pass(int target, int msg) 42static void do_message_pass(int target, int msg)
56{ 43{
57 int result; 44 int result;
@@ -119,8 +106,7 @@ static void __init ps3_smp_setup_cpu(int cpu)
119 DBG("%s:%d: (%d, %d) => virq %u\n", 106 DBG("%s:%d: (%d, %d) => virq %u\n",
120 __func__, __LINE__, cpu, i, virqs[i]); 107 __func__, __LINE__, cpu, i, virqs[i]);
121 108
122 result = request_irq(virqs[i], ipi_function_handler, 109 result = smp_request_message_ipi(virqs[i], i);
123 IRQF_DISABLED, names[i], (void*)(long)i);
124 110
125 if (result) 111 if (result)
126 virqs[i] = NO_IRQ; 112 virqs[i] = NO_IRQ;