Skip to content

Commit

Permalink
s390/smp: only send external call ipi if needed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Dec 16, 2013
1 parent e6b2551 commit dea2419
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit dea2419

Please sign in to comment.