diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-06-24 12:29:01 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-06-27 14:18:30 +1000 |
commit | ba6d334ac230065243a92bb7cb3fd6a5f6a7f8ac (patch) | |
tree | 6ceb186cbb0b29e634db2c117e9894f160a5925b /arch/powerpc/kernel/idle_book3s.S | |
parent | 74e27c6af56fe6898c3c8c451595746a992f0f0f (diff) | |
download | linux-ba6d334ac230065243a92bb7cb3fd6a5f6a7f8ac.tar.gz linux-ba6d334ac230065243a92bb7cb3fd6a5f6a7f8ac.tar.bz2 linux-ba6d334ac230065243a92bb7cb3fd6a5f6a7f8ac.zip |
powerpc/64s: Invalidate ERAT on powersave wakeup for POWER9
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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Merge comment change with upstream changes]
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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index 1ea14b96f126..f6518c768d2a 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S @@ -436,6 +436,13 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_ARCH_300) */ pnv_restore_hyp_resource_arch300: /* + * Workaround for POWER9, if we lost resources, the ERAT + * might have been mixed up and needs flushing. + */ + blt cr3,1f + PPC_INVALIDATE_ERAT +1: + /* * POWER ISA 3. Use PSSCR to determine if we * are waking up from deep idle state */ |