Commit fc37a163 authored by Desnes A. Nunes do Rosario's avatar Desnes A. Nunes do Rosario Committed by Michael Ellerman

powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems

PowerVM systems running compatibility mode on a few Power8 revisions are
still vulnerable to the hardware defect that loses PMU exceptions arriving
prior to a context switch.

The software fix for this issue is enabled through the CPU_FTR_PMAO_BUG
cpu_feature bit, nevertheless this bit also needs to be set for PowerVM
compatibility mode systems.

Fixes: 68f2f0d4 ("powerpc: Add a cpu feature CPU_FTR_PMAO_BUG")
Signed-off-by: default avatarDesnes A. Nunes do Rosario <desnesn@linux.ibm.com>
Reviewed-by: default avatarLeonardo Bras <leonardo@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200227134715.9715-1-desnesn@linux.ibm.com
parent cb0cc635
...@@ -2193,11 +2193,13 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset, ...@@ -2193,11 +2193,13 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
* oprofile_cpu_type already has a value, then we are * oprofile_cpu_type already has a value, then we are
* possibly overriding a real PVR with a logical one, * possibly overriding a real PVR with a logical one,
* and, in that case, keep the current value for * and, in that case, keep the current value for
* oprofile_cpu_type. * oprofile_cpu_type. Futhermore, let's ensure that the
* fix for the PMAO bug is enabled on compatibility mode.
*/ */
if (old.oprofile_cpu_type != NULL) { if (old.oprofile_cpu_type != NULL) {
t->oprofile_cpu_type = old.oprofile_cpu_type; t->oprofile_cpu_type = old.oprofile_cpu_type;
t->oprofile_type = old.oprofile_type; t->oprofile_type = old.oprofile_type;
t->cpu_features |= old.cpu_features & CPU_FTR_PMAO_BUG;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment