Re: [PATCH] perf/arm-cmn: Add shutdown routine

From: Robin Murphy
Date: Wed Nov 30 2022 - 07:28:28 EST


On 2022-11-29 19:52, Will Deacon wrote:
On Fri, 25 Nov 2022 17:01:53 -0600, Geoff Blake wrote:
The CMN driver does not gracefully handle all
restart cases, such as kexec. On a kexec if the
arm-cmn driver is in use it can be left in a state
with still active events that can cause spurious and/or
unhandled interrupts that appear as non-fatal kernel errors
like below, that can be confusing and misleading:

[...]

Applied to will (for-next/perf), thanks!

[1/1] perf/arm-cmn: Add shutdown routine
https://git.kernel.org/will/c/316f862a787c

Oh, if I'd seen this I'd have said the same thing as when asked about it off-list, that it's needlessly overcomplicated and doesn't really solve the problem anyway. If there's a need to be robust against spurious interrupts then that needs to be done in the interrupt handler.

Even if we do think it's worth stopping the PMU on shutdown, as we do on remove, that still only needs a single register write (per the current remove implementation).

Thanks,
Robin.