aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r--arch/powerpc/kernel/smp.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index ac2621af3154..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 call_function_single_action(int irq, void *data) 149static irqreturn_t tick_broadcast_ipi_action(int irq, void *data)
149{ 150{
150 generic_smp_call_function_single_interrupt(); 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_CALL_FUNC_SINGLE] = call_function_single_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_CALL_FUNC_SINGLE] = "ipi call function single", 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,8 +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();
254 if (all & IPI_MESSAGE(PPC_MSG_CALL_FUNC_SINGLE)) 255 if (all & IPI_MESSAGE(PPC_MSG_TICK_BROADCAST))
255 generic_smp_call_function_single_interrupt(); 256 tick_broadcast_ipi_handler();
256 if (all & IPI_MESSAGE(PPC_MSG_DEBUGGER_BREAK)) 257 if (all & IPI_MESSAGE(PPC_MSG_DEBUGGER_BREAK))
257 debug_ipi_action(0, NULL); 258 debug_ipi_action(0, NULL);
258 } while (info->messages); 259 } while (info->messages);
@@ -280,7 +281,7 @@ EXPORT_SYMBOL_GPL(smp_send_reschedule);
280 281
281void arch_send_call_function_single_ipi(int cpu) 282void arch_send_call_function_single_ipi(int cpu)
282{ 283{
283 do_message_pass(cpu, PPC_MSG_CALL_FUNC_SINGLE); 284 do_message_pass(cpu, PPC_MSG_CALL_FUNCTION);
284} 285}
285 286
286void arch_send_call_function_ipi_mask(const struct cpumask *mask) 287void arch_send_call_function_ipi_mask(const struct cpumask *mask)
@@ -291,6 +292,16 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask)
291 do_message_pass(cpu, PPC_MSG_CALL_FUNCTION); 292 do_message_pass(cpu, PPC_MSG_CALL_FUNCTION);
292} 293}
293 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
294#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) 305#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
295void smp_send_debugger_break(void) 306void smp_send_debugger_break(void)
296{ 307{