[PATCH v15 17/20] arm64: kdump: implement machine_crash_shutdown()
mark.rutland at arm.com
Thu Mar 31 03:10:38 PDT 2016
On Thu, Mar 31, 2016 at 09:12:32AM +0100, Marc Zyngier wrote:
> On 31/03/16 08:57, AKASHI Takahiro wrote:
> > On Mon, Mar 21, 2016 at 01:29:28PM +0000, James Morse wrote:
> >> On 18/03/16 18:08, James Morse wrote:
> >>> On 14/03/16 17:48, Geoff Levand wrote:
> >>>> + /* just in case */
> >>>> + while (1)
> >>>> + wfi();
> >> Having thought about this some more: I don't think spinning like this is safe.
> >> We need to spin with the MMU turned off, otherwise this core will pollute the
> >> kdump kernel with TLB entries from the old page tables.
> > I think that wfi() will never wake up since local interrupts are disabled
> > here. So how can it pollute the kdump kernel?
> Having interrupts disabled doesn't prevent an exit from WFI. Quite the
> opposite, actually. It is designed to wake-up the core when something
> happens on the external interface.
Further, WFI is a hint, and may simply act as a NOP.
The ARM ARM calls this out (see "D1.17.2" Wait For Interrupt in ARM DDI
Because the architecture permits a PE to leave the low-power
state for any reason, it is permissible for a PE to treat WFI as
a NOP , but this is not recommended for lowest power operation.
More information about the linux-arm-kernel