aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/include/asm/paca.h1
-rw-r--r--arch/powerpc/kernel/asm-offsets.c1
-rw-r--r--arch/powerpc/kernel/idle_power7.S4
-rw-r--r--arch/powerpc/kvm/book3s_hv_rmhandlers.S3
4 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h
index 17722c73ba2e..269c05a36d91 100644
--- a/arch/powerpc/include/asm/paca.h
+++ b/arch/powerpc/include/asm/paca.h
@@ -135,6 +135,7 @@ struct paca_struct {
135 u8 hard_enabled; /* set if irqs are enabled in MSR */ 135 u8 hard_enabled; /* set if irqs are enabled in MSR */
136 u8 io_sync; /* writel() needs spin_unlock sync */ 136 u8 io_sync; /* writel() needs spin_unlock sync */
137 u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */ 137 u8 irq_work_pending; /* IRQ_WORK interrupt while soft-disable */
138 u8 nap_state_lost; /* NV GPR values lost in power7_idle */
138 139
139#ifdef CONFIG_PPC_POWERNV 140#ifdef CONFIG_PPC_POWERNV
140 /* Pointer to OPAL machine check event structure set by the 141 /* Pointer to OPAL machine check event structure set by the
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 7c5324f1ec9c..04caee7d9bc1 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -208,6 +208,7 @@ int main(void)
208 DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time)); 208 DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
209 DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); 209 DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
210 DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save)); 210 DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save));
211 DEFINE(PACA_NAPSTATELOST, offsetof(struct paca_struct, nap_state_lost));
211#endif /* CONFIG_PPC64 */ 212#endif /* CONFIG_PPC64 */
212 213
213 /* RTAS */ 214 /* RTAS */
diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
index 3a70845a51c7..fcdff198da4b 100644
--- a/arch/powerpc/kernel/idle_power7.S
+++ b/arch/powerpc/kernel/idle_power7.S
@@ -54,6 +54,7 @@ _GLOBAL(power7_idle)
54 li r0,0 54 li r0,0
55 stb r0,PACASOFTIRQEN(r13) /* we'll hard-enable shortly */ 55 stb r0,PACASOFTIRQEN(r13) /* we'll hard-enable shortly */
56 stb r0,PACAHARDIRQEN(r13) 56 stb r0,PACAHARDIRQEN(r13)
57 stb r0,PACA_NAPSTATELOST(r13)
57 58
58 /* Continue saving state */ 59 /* Continue saving state */
59 SAVE_GPR(2, r1) 60 SAVE_GPR(2, r1)
@@ -86,6 +87,9 @@ _GLOBAL(power7_wakeup_loss)
86 rfid 87 rfid
87 88
88_GLOBAL(power7_wakeup_noloss) 89_GLOBAL(power7_wakeup_noloss)
90 lbz r0,PACA_NAPSTATELOST(r13)
91 cmpwi r0,0
92 bne .power7_wakeup_loss
89 ld r1,PACAR1(r13) 93 ld r1,PACAR1(r13)
90 ld r4,_MSR(r1) 94 ld r4,_MSR(r1)
91 ld r5,_NIP(r1) 95 ld r5,_NIP(r1)
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index 44d8829334ab..5c8b26183f50 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -112,6 +112,9 @@ kvm_start_guest:
112 stbcix r0, r5, r6 /* clear it */ 112 stbcix r0, r5, r6 /* clear it */
113 stwcix r8, r5, r7 /* EOI it */ 113 stwcix r8, r5, r7 /* EOI it */
114 114
115 /* NV GPR values from power7_idle() will no longer be valid */
116 stb r0, PACA_NAPSTATELOST(r13)
117
115.global kvmppc_hv_entry 118.global kvmppc_hv_entry
116kvmppc_hv_entry: 119kvmppc_hv_entry:
117 120