Nicholas Piggin 6029755eed powerpc: Fix deadlock with multiple calls to smp_send_stop
smp_send_stop can lock up the IPI path for any subsequent calls,
because the receiving CPUs spin in their handler function. This
started becoming a problem with the addition of an smp_send_stop
call in the reboot path, because panics can reboot after doing
their own smp_send_stop.

The NMI IPI variant was fixed with ac61c11566 ("powerpc: Fix
smp_send_stop NMI IPI handling"), which leaves the smp_call_function
variant.

This is fixed by having smp_send_stop only ever do the
smp_call_function once. This is a bit less robust than the NMI IPI
fix, because any other call to smp_call_function after smp_send_stop
could deadlock, but that has always been the case, and it was not
been a problem before.

Fixes: f2748bdfe1573 ("powerpc/powernv: Always stop secondaries before reboot/shutdown")
Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-04-27 16:35:57 +10:00
..
2017-11-16 12:47:46 -08:00
2018-04-01 00:47:50 +11:00
2018-01-15 09:35:26 +01:00
2016-08-07 23:50:09 -04:00
2016-08-07 23:50:09 -04:00
2018-04-07 12:08:19 -07:00
2018-02-02 10:01:04 -08:00
2016-08-07 23:50:09 -04:00
2018-02-02 10:01:04 -08:00
2018-03-31 09:09:36 +11:00
2017-12-11 13:03:35 +11:00
2018-02-06 09:59:40 -08:00
2018-03-31 09:09:36 +11:00
2018-03-30 23:34:26 +11:00
2018-03-31 09:09:36 +11:00
2017-11-16 12:47:46 -08:00
2015-04-07 17:15:13 +10:00
2018-02-02 10:01:04 -08:00