diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-04-19 15:05:46 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-23 12:31:43 +0200 |
commit | 10101aa9aa9d2e6b403610de196945ecbf93cf06 (patch) | |
tree | ac4147247d3ea5aea1a53004a0c5b465c0648768 /arch/powerpc/kernel/idle_book3s.S | |
parent | powerpc/64s: Stop using bit in HSPRG0 to test winkle (diff) | |
download | linux-10101aa9aa9d2e6b403610de196945ecbf93cf06.tar.xz linux-10101aa9aa9d2e6b403610de196945ecbf93cf06.zip |
powerpc/64s: Use alternative feature patching
This reduces the number of nops for POWER8.
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/idle_book3s.S')
-rw-r--r-- | arch/powerpc/kernel/idle_book3s.S | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index a80d76f9e961..dd8ca7fdf55a 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S @@ -421,7 +421,11 @@ power9_dd1_recover_paca: */ .global pnv_powersave_wakeup pnv_powersave_wakeup: - bl pnv_restore_hyp_resource +BEGIN_FTR_SECTION + bl pnv_restore_hyp_resource_arch300 +FTR_SECTION_ELSE + bl pnv_restore_hyp_resource_arch207 +ALT_FTR_SECTION_END_IFSET(CPU_FTR_ARCH_300) li r0,PNV_THREAD_RUNNING stb r0,PACA_THREAD_IDLE_STATE(r13) /* Clear thread state */ @@ -449,7 +453,11 @@ pnv_powersave_wakeup: * * cr3 - set to gt if waking up with partial/complete hypervisor state loss */ -pnv_restore_hyp_resource: +pnv_restore_hyp_resource_arch300: + /* + * POWER ISA 3. Use PSSCR to determine if we + * are waking up from deep idle state + */ BEGIN_FTR_SECTION mflr r6 bl power9_dd1_recover_paca @@ -458,11 +466,6 @@ FTR_SECTION_ELSE ld r2, PACATOC(r13) ALT_FTR_SECTION_END_IFSET(CPU_FTR_POWER9_DD1) -BEGIN_FTR_SECTION - /* - * POWER ISA 3. Use PSSCR to determine if we - * are waking up from deep idle state - */ LOAD_REG_ADDRBASE(r5,pnv_first_deep_stop_state) ld r4,ADDROFF(pnv_first_deep_stop_state)(r5) @@ -477,12 +480,14 @@ BEGIN_FTR_SECTION blr /* Waking up without hypervisor state loss. */ -END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) - +/* Same calling convention as arch300 */ +pnv_restore_hyp_resource_arch207: /* * POWER ISA 2.07 or less. * Check if we slept with winkle. */ + ld r2,PACATOC(r13); + lbz r0,PACA_THREAD_IDLE_STATE(r13) cmpwi cr2,r0,PNV_THREAD_NAP cmpwi cr4,r0,PNV_THREAD_WINKLE |