Skip to content

Commit 7a43906

Browse files
ozbenhmpe
authored andcommitted
powerpc: Set missing wakeup bit in LPCR on POWER9
There is a new bit, LPCR_PECE_HVEE (Hypervisor Virtualization Exit Enable), which controls wakeup from STOP states on Hypervisor Virtualization Interrupts (which happen to also be all external interrupts in host or bare metal mode). It needs to be set or we will miss wakeups. Fixes: 9baaef0 ("powerpc/irq: Add support for HV virtualization interrupts") Cc: stable@vger.kernel.org # v4.8+ Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [mpe: Rename it to HVEE to match the name in the ISA] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent cac4a18 commit 7a43906

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

arch/powerpc/include/asm/reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@
355355
#define LPCR_PECE0 ASM_CONST(0x0000000000004000) /* ext. exceptions can cause exit */
356356
#define LPCR_PECE1 ASM_CONST(0x0000000000002000) /* decrementer can cause exit */
357357
#define LPCR_PECE2 ASM_CONST(0x0000000000001000) /* machine check etc can cause exit */
358+
#define LPCR_PECE_HVEE ASM_CONST(0x0000400000000000) /* P9 Wakeup on HV interrupts */
358359
#define LPCR_MER ASM_CONST(0x0000000000000800) /* Mediated External Exception */
359360
#define LPCR_MER_SH 11
360361
#define LPCR_TC ASM_CONST(0x0000000000000200) /* Translation control */

arch/powerpc/kernel/cpu_setup_power.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ _GLOBAL(__setup_cpu_power9)
9898
li r0,0
9999
mtspr SPRN_LPID,r0
100100
mfspr r3,SPRN_LPCR
101-
ori r3, r3, LPCR_PECEDH
102-
ori r3, r3, LPCR_HVICE
101+
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE)
102+
or r3, r3, r4
103103
bl __init_LPCR
104104
bl __init_HFSCR
105105
bl __init_tlb_power9
@@ -118,8 +118,8 @@ _GLOBAL(__restore_cpu_power9)
118118
li r0,0
119119
mtspr SPRN_LPID,r0
120120
mfspr r3,SPRN_LPCR
121-
ori r3, r3, LPCR_PECEDH
122-
ori r3, r3, LPCR_HVICE
121+
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE)
122+
or r3, r3, r4
123123
bl __init_LPCR
124124
bl __init_HFSCR
125125
bl __init_tlb_power9

0 commit comments

Comments
 (0)