• Nicholas Piggin's avatar
    powerpc/smp: Fix NMI IPI xmon timeout · 19f4f94f
    Nicholas Piggin authored
    [ Upstream commit 88b9a3d1 ]
    
    The xmon debugger IPI handler waits in the callback function while
    xmon is still active. This means they don't complete the IPI, and the
    initiator always times out waiting for them.
    
    Things manage to work after the timeout because there is some fallback
    logic to keep NMI IPI state sane in case of the timeout, but this is a
    bit ugly.
    
    This patch changes NMI IPI back to half-asynchronous (i.e., wait for
    everyone to call in, do not wait for IPI function to complete), but
    the complexity is avoided by going one step further and allowing new
    IPIs to be issued before the IPI functions to all complete.
    
    If synchronization against that is required, it is left up to the
    caller, but current callers don't require that. In fact with the
    timeout handling, callers must be able to cope with this already.
    
    Fixes: 5b73151f ("powerpc: NMI IPI make NMI IPIs fully sychronous")
    Cc: stable@vger.kernel.org # v4.19+
    Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
    19f4f94f
smp.c 27.1 KB