• Nicholas Piggin's avatar
    powerpc/powernv: call OPAL_QUIESCE before OPAL_SIGNAL_SYSTEM_RESET · ee03b9b4
    Nicholas Piggin authored
    Although it is often possible to recover a CPU that was interrupted
    from OPAL with a system reset NMI, it's undesirable to interrupt them
    for a few reasons. Firstly because dump/debug code itself needs to
    call firmware, so it could hang on a lock or possibly corrupt a
    per-cpu data structure if it or another CPU was interrupted from
    OPAL. Secondly, the kexec crash dump code will not return from
    interrupt to unwind the OPAL call.
    
    Call OPAL_QUIESCE with QUIESCE_HOLD before sending an NMI IPI to
    another CPU, which wait for it to leave firmware (or time out) to
    avoid this problem in normal conditions. Firmware bugs may still
    result in a timeout and interrupting OPAL, but that is the best
    option (stops the CPU, and possibly allows firmware to be debugged).
    Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    ee03b9b4
opal-wrappers.S 11.8 KB