All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Invalidate ERAT on powersave wakeup for POWER9
@ 2017-06-22 17:26 Michael Neuling
  2017-06-23  0:50 ` Stewart Smith
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Michael Neuling @ 2017-06-22 17:26 UTC (permalink / raw)
  To: mpe; +Cc: linuxppc-dev, Nicholas Piggin, benh, Michael Neuling

On POWER9 the ERAT may be incorrect on wakeup from some stop states
that lose state. This causes random segvs and illegal instructions
when these stop states are enabled.

This patch invalidates the ERAT on wakeup on POWER9 to prevent this
from causing a problem.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
 arch/powerpc/kernel/idle_book3s.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
index 1ea14b96f1..ace2ad50c8 100644
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -793,6 +793,9 @@ fastsleep_workaround_at_exit:
  */
 .global pnv_wakeup_loss
 pnv_wakeup_loss:
+BEGIN_FTR_SECTION
+	PPC_INVALIDATE_ERAT
+END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
 	ld	r1,PACAR1(r13)
 BEGIN_FTR_SECTION
 	CHECK_HMI_INTERRUPT
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-06-29 12:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-22 17:26 [PATCH] powerpc: Invalidate ERAT on powersave wakeup for POWER9 Michael Neuling
2017-06-23  0:50 ` Stewart Smith
2017-06-23  2:12   ` Michael Neuling
2017-06-23  3:09   ` Michael Neuling
2017-06-23  9:33 ` Michael Ellerman
2017-06-23 10:24   ` Nicholas Piggin
2017-06-23 10:45   ` Benjamin Herrenschmidt
2017-06-23 10:22 ` Anshuman Khandual
2017-06-24 17:29 ` [PATCH v2] " Benjamin Herrenschmidt
2017-06-25  5:18   ` Nicholas Piggin
2017-06-29 12:21   ` [v2] " Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.