summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/dt_cpu_ftrs.c
diff options
context:
space:
mode:
authorMichael Neuling2018-05-18 03:37:42 +0200
committerMichael Ellerman2018-05-18 08:05:15 +0200
commitfaf37c44a105f3608115785f17cbbf3500f8bc71 (patch)
tree5d7a9292192cb0936af35357aa5f007640b95f85 /arch/powerpc/kernel/dt_cpu_ftrs.c
parentpowerpc/powernv: Fix NVRAM sleep in invalid context when crashing (diff)
downloadkernel-qcow2-linux-faf37c44a105f3608115785f17cbbf3500f8bc71.tar.gz
kernel-qcow2-linux-faf37c44a105f3608115785f17cbbf3500f8bc71.tar.xz
kernel-qcow2-linux-faf37c44a105f3608115785f17cbbf3500f8bc71.zip
powerpc/64s: Clear PCR on boot
Clear the PCR (Processor Compatibility Register) on boot to ensure we are not running in a compatibility mode. We've seen this cause problems when a crash (and kdump) occurs while running compat mode guests. The kdump kernel then runs with the PCR set and causes problems. The symptom in the kdump kernel (also seen in petitboot after fast-reboot) is early userspace programs taking sigills on newer instructions (seen in libc). Signed-off-by: Michael Neuling <mikey@neuling.org> Cc: stable@vger.kernel.org Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/dt_cpu_ftrs.c')
-rw-r--r--arch/powerpc/kernel/dt_cpu_ftrs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
index 8ab51f6ca03a..c904477abaf3 100644
--- a/arch/powerpc/kernel/dt_cpu_ftrs.c
+++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
@@ -101,6 +101,7 @@ static void __restore_cpu_cpufeatures(void)
if (hv_mode) {
mtspr(SPRN_LPID, 0);
mtspr(SPRN_HFSCR, system_registers.hfscr);
+ mtspr(SPRN_PCR, 0);
}
mtspr(SPRN_FSCR, system_registers.fscr);