• M
    Revert "powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead" · a67cc594
    Michael Ellerman 提交于
    As described in that commit:
    
      When stop is executed with EC=ESL=0, it appears to execute like a
      normal instruction (resuming from NIP when woken by interrupt). So
      all the save/restore handling can be avoided completely.
    
    This is true, except in the case of an NMI interrupt (sreset or
    machine check) interrupting the instruction. In that case, the NMI
    gets an "interrupt occurred while the processor was in power-saving
    mode" indication. The power-save wakeup code uses that bit to decide
    whether to restore some registers (e.g., LR). Because these are no
    longer saved, this causes random register corruption.
    
    It may be possible to restore this optimisation by detecting the case
    of no register loss on the wakeup side, and avoid restoring in that
    case, but that's not a minor fix because the wakeup code itself uses
    some registers that would be live (e.g., LR).
    
    Fixes: b9ee31e1 ("powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead")
    Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
    a67cc594
idle_book3s.S 25.9 KB