• Akshay Adiga's avatar
    powerpc/powernv/idle: Restore SPRs for deep idle states via stop API. · 1e1601b3
    Akshay Adiga authored
    Some of the SPR values (HID0, MSR, SPRG0) don't change during the run
    time of a booted kernel, once they have been initialized.
    
    The contents of these SPRs are lost when the CPUs enter deep stop
    states. So instead saving and restoring SPRs from the kernel, use the
    stop-api provided by the firmware by which the firmware can restore
    the contents of these SPRs to their initialized values after wakeup
    from a deep stop state.
    
    Apart from these, program the PSSCR value to that of the deepest stop
    state via the stop-api. This will be used to indicate to the
    underlying firmware as to what stop state to put the threads that have
    been woken up by a special-wakeup.
    
    And while we are at programming SPRs via stop-api, ensure that HID1,
    HID4 and HID5 registers which are only available on POWER8 are not
    requested to be restored by the firware on POWER9.
    Signed-off-by: default avatarAkshay Adiga <akshay.adiga@linux.vnet.ibm.com>
    Signed-off-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    1e1601b3
idle.c 16.3 KB