Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-04-26 22:16:44 +0200
committerMichal Suchanek <msuchanek@suse.de>2018-04-26 22:16:44 +0200
commit6368307920f3644e348c01125fa59e7adc2d026e (patch)
tree6abd76c6e0d1ea2e2e88e88136fb44ffb3dddbba
parent6174b6c179f0647b26a582839a879f9e6eb75e8e (diff)
powerpc/64s/idle: Fix restore of AMOR on POWER9 after deep sleep
(bsc#1055186, fate#323286).
-rw-r--r--patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch39
-rw-r--r--series.conf1
2 files changed, 40 insertions, 0 deletions
diff --git a/patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch b/patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch
new file mode 100644
index 0000000000..12b57e3512
--- /dev/null
+++ b/patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch
@@ -0,0 +1,39 @@
+From c1b25a17d24925b0961c319cfc3fd7e1dc778914 Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Thu, 5 Apr 2018 16:10:00 +1000
+Subject: [PATCH] powerpc/64s/idle: Fix restore of AMOR on POWER9 after deep
+ sleep
+
+References: bsc#1055186, fate#323286
+Patch-mainline: v4.17-rc1
+Git-commit: c1b25a17d24925b0961c319cfc3fd7e1dc778914
+
+POWER8 restores AMOR when waking from deep sleep, but POWER9 does not,
+because it does not go through the subcore restore.
+
+Have POWER9 restore it in core restore.
+
+Fixes: ee97b6b99f42 ("powerpc/mm/radix: Setup AMOR in HV mode to allow key 0")
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kernel/idle_book3s.S | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
+index e5cb3eedb564..79d005445c6c 100644
+--- a/arch/powerpc/kernel/idle_book3s.S
++++ b/arch/powerpc/kernel/idle_book3s.S
+@@ -870,6 +870,8 @@ BEGIN_FTR_SECTION
+ mtspr SPRN_PTCR,r4
+ ld r4,_RPR(r1)
+ mtspr SPRN_RPR,r4
++ ld r4,_AMOR(r1)
++ mtspr SPRN_AMOR,r4
+ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
+
+ ld r4,_TSCR(r1)
+--
+2.13.6
+
diff --git a/series.conf b/series.conf
index ccfb637783..2541dd6d6e 100644
--- a/series.conf
+++ b/series.conf
@@ -11732,6 +11732,7 @@
patches.arch/powerpc-64s-Fix-dt_cpu_ftrs-to-have-restore_cpu-clea.patch
patches.arch/powerpc-64s-Fix-pkey-support-in-dt_cpu_ftrs-add-CPU_.patch
patches.arch/powerpc-64s-Fix-POWER9-DD2.2-and-above-in-cputable-f.patch
+ patches.arch/powerpc-64s-idle-Fix-restore-of-AMOR-on-POWER9-after.patch
patches.arch/s390-move-nobp-parameter-functions-to-nospec-branch..patch
patches.arch/s390-add-automatic-detection-of-the-spectre-defense.patch
patches.arch/s390-report-spectre-mitigation-via-syslog.patch