diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2013-12-03 10:06:29 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-12-16 14:37:43 +0100 |
commit | dea24190fbfb340dea5224e32161955514bef31b (patch) | |
tree | 8d2ea60d07e9f6291f22ef78fa69c7726430087b /arch | |
parent | e6b2551425d961e68e70e806e22ec40787f7ed67 (diff) |
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')
-rw-r--r-- | arch/s390/kernel/smp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index dc4a5346506..86b291323c6 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); } |