From: Michael Neuling <mikey@neuling.org>
To: mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org,
Nicholas Piggin <npiggin@gmail.com>,
benh@kernel.crashing.org, Michael Neuling <mikey@neuling.org>
Subject: [PATCH] powerpc: Invalidate ERAT on powersave wakeup for POWER9
Date: Thu, 22 Jun 2017 12:26:16 -0500 [thread overview]
Message-ID: <20170622172616.7598-1-mikey@neuling.org> (raw)
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
next reply other threads:[~2017-06-22 17:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 17:26 Michael Neuling [this message]
2017-06-23 0:50 ` [PATCH] powerpc: Invalidate ERAT on powersave wakeup for POWER9 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170622172616.7598-1-mikey@neuling.org \
--to=mikey@neuling.org \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).