powerpc/powernv: Add context management for Fast Sleep
Before adding Fast-Sleep into the cpuidle framework, some low level support needs to be added to enable it. This includes saving and restoring of certain registers at entry and exit time of this state respectively just like we do in the NAP idle state. Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> [Changelog modified by Preeti U. Murthy <preeti@linux.vnet.ibm.com>] Signed-off-by: Preeti U. Murthy <preeti@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
1b7839559b
commit
aca79d2b6e
@@ -121,9 +121,10 @@ BEGIN_FTR_SECTION
|
||||
cmpwi cr1,r13,2
|
||||
/* Total loss of HV state is fatal, we could try to use the
|
||||
* PIR to locate a PACA, then use an emergency stack etc...
|
||||
* but for now, let's just stay stuck here
|
||||
* OPAL v3 based powernv platforms have new idle states
|
||||
* which fall in this catagory.
|
||||
*/
|
||||
bgt cr1,.
|
||||
bgt cr1,8f
|
||||
GET_PACA(r13)
|
||||
|
||||
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
|
||||
@@ -141,6 +142,11 @@ BEGIN_FTR_SECTION
|
||||
beq cr1,2f
|
||||
b .power7_wakeup_noloss
|
||||
2: b .power7_wakeup_loss
|
||||
|
||||
/* Fast Sleep wakeup on PowerNV */
|
||||
8: GET_PACA(r13)
|
||||
b .power7_wakeup_loss
|
||||
|
||||
9:
|
||||
END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206)
|
||||
#endif /* CONFIG_PPC_P7_NAP */
|
||||
|
Reference in New Issue
Block a user