aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorKirill Tkhai <tkhai@yandex.ru>2013-09-14 08:00:09 -0400
committerDavid S. Miller <davem@davemloft.net>2013-11-14 17:56:50 -0500
commit1a36265bf7d7e16b35fab5ae7f2f5d499bd0c14d (patch)
treedeed30adefe83b47a661230a9876f9370141c5e9 /arch/sparc
parent557fc5873ef178c4b3e1e36a42db547ecdc43f9b (diff)
sparc64: Add self-IPI support for smp_send_reschedule()
CONFIG_NO_HZ_FULL requires possibility of smp_send_reschedule() for the calling CPU. Currently, it is used in inc_nr_running() scheduler primitive only. Nobody calls smp_send_reschedule() from preemptible context (furthermore, it looks like it will be save if anybody use it another way in the future). But anyway I add WARN_ON() here just to return here if anything changes. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> CC: David Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/smp_64.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index e142545244f2..b66a5338231e 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1399,8 +1399,13 @@ void __init smp_cpus_done(unsigned int max_cpus)
1399 1399
1400void smp_send_reschedule(int cpu) 1400void smp_send_reschedule(int cpu)
1401{ 1401{
1402 xcall_deliver((u64) &xcall_receive_signal, 0, 0, 1402 if (cpu == smp_processor_id()) {
1403 cpumask_of(cpu)); 1403 WARN_ON_ONCE(preemptible());
1404 set_softint(1 << PIL_SMP_RECEIVE_SIGNAL);
1405 } else {
1406 xcall_deliver((u64) &xcall_receive_signal,
1407 0, 0, cpumask_of(cpu));
1408 }
1404} 1409}
1405 1410
1406void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs) 1411void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs)