[PATCH] kdump: Fix crash_kexec - smp_send_stop race in panic
Richard Kuo
rkuo at codeaurora.org
Fri Nov 11 12:45:06 EST 2011
On Fri, Nov 11, 2011 at 01:28:14PM +0100, Michael Holzheu wrote:
> Hello Chris,
>
> On Thu, 2011-11-10 at 10:11 -0500, Chris Metcalf wrote:
> > On 11/10/2011 9:22 AM, Michael Holzheu wrote:
>
> [snip]
>
> > If a cleaner API seems useful (either for power reasons or restartability
> > or whatever), I suppose a standard global function name could be specified
> > that's the thing you execute when you get an smp_send_stop IPI (in tile's
> > case it's "smp_stop_cpu_interrupt()") and the panic() code could instead
> > just do an atomic_inc_return() of a global panic counter, and if it wasn't
> > the first panicking cpu, call directly into the smp_stop handler routine to
> > quiesce itself. Then the panicking cpu could finish whatever it needs to
> > do and then halt, reboot, etc., all the cpus.
>
> Thanks for the info. So introducing a "weak" function that can stop the
> CPU it is running on could solve the problem. Every architecture can
> override the function with something appropriate. E.g. "tile" can use
> the lower-power "nap" instruction there.
>
> What about the following patch.
Hexagon uses interrupts to send the stop to the other CPU's as well, and
we also have a stop local cpu operation defined, so I think we're in the same
boat as tile. This patch should work for us.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
More information about the kexec
mailing list