On Thu, 14 Dec 2017 23:16:26 +1100 Balbir Singh <bsinghar...@gmail.com> wrote:
> On Thu, Dec 14, 2017 at 12:51 PM, Nicholas Piggin <npig...@gmail.com> wrote: > >> I can't call smp_send_nmi_ipi due to the nmi_ipi_busy_count and > >> I'm worried about calling a stale nmi_ipi_function via the > >> system_reset_exception path, if we are OK with it, I can revisit > >> the code path > > > > You shouldn't get a stale one, that would also be a bug -- we > > have to cope with NMIs coming in at any time that are triggered > > externally (not by smp_send_nmi_ipi), so if you see any bugs > > there those need to be fixed separately. > > > > Yes, I think it's a bug, nothing clears nmi_ipi_function (from what > I can see), so when the next NMI comes in and goes into > pnv_system_reset_exception > it'll execute the stale handler. The CPU won't be in the nmi_ipi_pending_mask though, so it shouldn't get that far. You could add a bit of paranoia to clear the function pointer I suppose, but AFAIKS it's not needed. > I'll respin things based on the > suggestion above > and deal with any bugs as well. Thanks, Nick