Skip to content

Commit

Permalink
[S390] smp: fix sigp stop handling
Browse files Browse the repository at this point in the history
According to the architecture a cpu must not necessarily enter stopped
state after completion of a sigp instruction with "stop" order code.
So remove the BUG() statement after self sending sigp stop to avoid
that it ever gets reached.
Also add a sigp busy check to make sure that the order gets delivered.

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 Oct 29, 2009
1 parent 70f5dc5 commit f8501ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 3 additions & 4 deletions arch/s390/kernel/ipl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,10 +1595,9 @@ static void stop_run(struct shutdown_trigger *trigger)
{
if (strcmp(trigger->name, ON_PANIC_STR) == 0)
disabled_wait((unsigned long) __builtin_return_address(0));
else {
signal_processor(smp_processor_id(), sigp_stop);
for (;;);
}
while (signal_processor(smp_processor_id(), sigp_stop) == sigp_busy)
cpu_relax();
for (;;);
}

static struct shutdown_action stop_action = {SHUTDOWN_ACTION_STOP_STR,
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,8 @@ void __cpu_die(unsigned int cpu)
void cpu_die(void)
{
idle_task_exit();
signal_processor(smp_processor_id(), sigp_stop);
BUG();
while (signal_processor(smp_processor_id(), sigp_stop) == sigp_busy)
cpu_relax();
for (;;);
}

Expand Down
1 change: 1 addition & 0 deletions arch/s390/kernel/swsusp_asm64.S
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ pgm_check_entry:
brc 2,4b /* busy, try again */
5:
sigp %r9,%r2,__SIGP_STOP /* stop resume (current) CPU */
brc 2,5b /* busy, try again */
6: j 6b

restart_suspend:
Expand Down

0 comments on commit f8501ba

Please sign in to comment.