aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/smp.h2
-rw-r--r--arch/powerpc/include/asm/time.h1
-rw-r--r--arch/powerpc/kernel/smp.c21
-rw-r--r--arch/powerpc/kernel/time.c5
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c2
-rw-r--r--arch/powerpc/platforms/ps3/smp.c2
6 files changed, 26 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index 9f7356bf6482..ff51046b6466 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -120,7 +120,7 @@ extern int cpu_to_core_id(int cpu);
120 * in /proc/interrupts will be wrong!!! --Troy */ 120 * in /proc/interrupts will be wrong!!! --Troy */
121#define PPC_MSG_CALL_FUNCTION 0 121#define PPC_MSG_CALL_FUNCTION 0
122#define PPC_MSG_RESCHEDULE 1 122#define PPC_MSG_RESCHEDULE 1
123#define PPC_MSG_UNUSED 2 123#define PPC_MSG_TICK_BROADCAST 2
124#define PPC_MSG_DEBUGGER_BREAK 3 124#define PPC_MSG_DEBUGGER_BREAK 3
125 125
126/* for irq controllers that have dedicated ipis per message (4) */ 126/* for irq controllers that have dedicated ipis per message (4) */
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h
index c1f267694acb..1d428e6007ca 100644
--- a/arch/powerpc/include/asm/time.h
+++ b/arch/powerpc/include/asm/time.h
@@ -28,6 +28,7 @@ extern struct clock_event_device decrementer_clockevent;
28struct rtc_time; 28struct rtc_time;
29extern void to_tm(int tim, struct rtc_time * tm); 29extern void to_tm(int tim, struct rtc_time * tm);
30extern void GregorianDay(struct rtc_time *tm); 30extern void GregorianDay(struct rtc_time *tm);
31extern void tick_broadcast_ipi_handler(void);
31 32
32extern void generic_calibrate_decr(void); 33extern void generic_calibrate_decr(void);
33 34
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index ee7d76bfcb4c..e2a4232c5871 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -35,6 +35,7 @@
35#include <asm/ptrace.h> 35#include <asm/ptrace.h>
36#include <linux/atomic.h> 36#include <linux/atomic.h>
37#include <asm/irq.h> 37#include <asm/irq.h>
38#include <asm/hw_irq.h>
38#include <asm/page.h> 39#include <asm/page.h>
39#include <asm/pgtable.h> 40#include <asm/pgtable.h>
40#include <asm/prom.h> 41#include <asm/prom.h>
@@ -145,9 +146,9 @@ static irqreturn_t reschedule_action(int irq, void *data)
145 return IRQ_HANDLED; 146 return IRQ_HANDLED;
146} 147}
147 148
148static irqreturn_t unused_action(int irq, void *data) 149static irqreturn_t tick_broadcast_ipi_action(int irq, void *data)
149{ 150{
150 /* This slot is unused and hence available for use, if needed */ 151 tick_broadcast_ipi_handler();
151 return IRQ_HANDLED; 152 return IRQ_HANDLED;
152} 153}
153 154
@@ -168,14 +169,14 @@ static irqreturn_t debug_ipi_action(int irq, void *data)
168static irq_handler_t smp_ipi_action[] = { 169static irq_handler_t smp_ipi_action[] = {
169 [PPC_MSG_CALL_FUNCTION] = call_function_action, 170 [PPC_MSG_CALL_FUNCTION] = call_function_action,
170 [PPC_MSG_RESCHEDULE] = reschedule_action, 171 [PPC_MSG_RESCHEDULE] = reschedule_action,
171 [PPC_MSG_UNUSED] = unused_action, 172 [PPC_MSG_TICK_BROADCAST] = tick_broadcast_ipi_action,
172 [PPC_MSG_DEBUGGER_BREAK] = debug_ipi_action, 173 [PPC_MSG_DEBUGGER_BREAK] = debug_ipi_action,
173}; 174};
174 175
175const char *smp_ipi_name[] = { 176const char *smp_ipi_name[] = {
176 [PPC_MSG_CALL_FUNCTION] = "ipi call function", 177 [PPC_MSG_CALL_FUNCTION] = "ipi call function",
177 [PPC_MSG_RESCHEDULE] = "ipi reschedule", 178 [PPC_MSG_RESCHEDULE] = "ipi reschedule",
178 [PPC_MSG_UNUSED] = "ipi unused", 179 [PPC_MSG_TICK_BROADCAST] = "ipi tick-broadcast",
179 [PPC_MSG_DEBUGGER_BREAK] = "ipi debugger", 180 [PPC_MSG_DEBUGGER_BREAK] = "ipi debugger",
180}; 181};
181 182
@@ -251,6 +252,8 @@ irqreturn_t smp_ipi_demux(void)
251 generic_smp_call_function_interrupt(); 252 generic_smp_call_function_interrupt();
252 if (all & IPI_MESSAGE(PPC_MSG_RESCHEDULE)) 253 if (all & IPI_MESSAGE(PPC_MSG_RESCHEDULE))
253 scheduler_ipi(); 254 scheduler_ipi();
255 if (all & IPI_MESSAGE(PPC_MSG_TICK_BROADCAST))
256 tick_broadcast_ipi_handler();
254 if (all & IPI_MESSAGE(PPC_MSG_DEBUGGER_BREAK)) 257 if (all & IPI_MESSAGE(PPC_MSG_DEBUGGER_BREAK))
255 debug_ipi_action(0, NULL); 258 debug_ipi_action(0, NULL);
256 } while (info->messages); 259 } while (info->messages);
@@ -289,6 +292,16 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask)
289 do_message_pass(cpu, PPC_MSG_CALL_FUNCTION); 292 do_message_pass(cpu, PPC_MSG_CALL_FUNCTION);
290} 293}
291 294
295#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
296void tick_broadcast(const struct cpumask *mask)
297{
298 unsigned int cpu;
299
300 for_each_cpu(cpu, mask)
301 do_message_pass(cpu, PPC_MSG_TICK_BROADCAST);
302}
303#endif
304
292#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) 305#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
293void smp_send_debugger_break(void) 306void smp_send_debugger_break(void)
294{ 307{
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index b3dab20acf34..3ff97dbb35be 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -825,6 +825,11 @@ static void decrementer_set_mode(enum clock_event_mode mode,
825 decrementer_set_next_event(DECREMENTER_MAX, dev); 825 decrementer_set_next_event(DECREMENTER_MAX, dev);
826} 826}
827 827
828/* Interrupt handler for the timer broadcast IPI */
829void tick_broadcast_ipi_handler(void)
830{
831}
832
828static void register_decrementer_clockevent(int cpu) 833static void register_decrementer_clockevent(int cpu)
829{ 834{
830 struct clock_event_device *dec = &per_cpu(decrementers, cpu); 835 struct clock_event_device *dec = &per_cpu(decrementers, cpu);
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index adf372606a1c..8a106b4172e0 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -215,7 +215,7 @@ void iic_request_IPIs(void)
215{ 215{
216 iic_request_ipi(PPC_MSG_CALL_FUNCTION); 216 iic_request_ipi(PPC_MSG_CALL_FUNCTION);
217 iic_request_ipi(PPC_MSG_RESCHEDULE); 217 iic_request_ipi(PPC_MSG_RESCHEDULE);
218 iic_request_ipi(PPC_MSG_UNUSED); 218 iic_request_ipi(PPC_MSG_TICK_BROADCAST);
219 iic_request_ipi(PPC_MSG_DEBUGGER_BREAK); 219 iic_request_ipi(PPC_MSG_DEBUGGER_BREAK);
220} 220}
221 221
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
index 00d1a7c2a5a4..b358bec6c8cb 100644
--- a/arch/powerpc/platforms/ps3/smp.c
+++ b/arch/powerpc/platforms/ps3/smp.c
@@ -76,7 +76,7 @@ static int __init ps3_smp_probe(void)
76 76
77 BUILD_BUG_ON(PPC_MSG_CALL_FUNCTION != 0); 77 BUILD_BUG_ON(PPC_MSG_CALL_FUNCTION != 0);
78 BUILD_BUG_ON(PPC_MSG_RESCHEDULE != 1); 78 BUILD_BUG_ON(PPC_MSG_RESCHEDULE != 1);
79 BUILD_BUG_ON(PPC_MSG_UNUSED != 2); 79 BUILD_BUG_ON(PPC_MSG_TICK_BROADCAST != 2);
80 BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3); 80 BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3);
81 81
82 for (i = 0; i < MSG_COUNT; i++) { 82 for (i = 0; i < MSG_COUNT; i++) {