]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc/powernv/idle: Restore SPRs for deep idle states via stop API.
authorAkshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Tue, 16 May 2017 08:49:46 +0000 (14:19 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 30 May 2017 04:59:51 +0000 (14:59 +1000)
commit1e1601b38e6e0179fafafc4db2c4ccb71d0854c4
tree4134fa9367bd2c0bf9b1adfe0f7085aa8b4e2956
parentcb0be7ec03077a31712183bfbe7801061e2966b8
powerpc/powernv/idle: Restore SPRs for deep idle states via stop API.

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: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/idle.c