aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-12-03 10:06:29 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-12-16 14:37:43 +0100
commitdea24190fbfb340dea5224e32161955514bef31b (patch)
tree8d2ea60d07e9f6291f22ef78fa69c7726430087b /arch/s390
parents390/blacklist: Perform subchannel scan only when needed (diff)
downloadlinux-dev-dea24190fbfb340dea5224e32161955514bef31b.tar.xz
linux-dev-dea24190fbfb340dea5224e32161955514bef31b.zip
s390/smp: only send external call ipi if needed
If the per cpu ec_mask bit of the receiving cpu is already set there is no need to send an ipi, since a different cpu has already sent an ipi and the receiving cpu has not yet executed the external call ipi handler. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/smp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index dc4a53465060..86b291323c62 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -159,9 +159,9 @@ static void pcpu_ec_call(struct pcpu *pcpu, int ec_bit)
{
int order;
- set_bit(ec_bit, &pcpu->ec_mask);
- order = pcpu_running(pcpu) ?
- SIGP_EXTERNAL_CALL : SIGP_EMERGENCY_SIGNAL;
+ if (test_and_set_bit(ec_bit, &pcpu->ec_mask))
+ return;
+ order = pcpu_running(pcpu) ? SIGP_EXTERNAL_CALL : SIGP_EMERGENCY_SIGNAL;
pcpu_sigp_retry(pcpu, order, 0);
}