Skip to content

Commit fc37a16

Browse files
Desnes A. Nunes do Rosariompe
Desnes A. Nunes do Rosario
authored andcommitted
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: 68f2f0d ("powerpc: Add a cpu feature CPU_FTR_PMAO_BUG") Signed-off-by: Desnes A. Nunes do Rosario <[email protected]> Reviewed-by: Leonardo Bras <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent cb0cc63 commit fc37a16

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/powerpc/kernel/cputable.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2193,11 +2193,13 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
21932193
* oprofile_cpu_type already has a value, then we are
21942194
* possibly overriding a real PVR with a logical one,
21952195
* and, in that case, keep the current value for
2196-
* oprofile_cpu_type.
2196+
* oprofile_cpu_type. Futhermore, let's ensure that the
2197+
* fix for the PMAO bug is enabled on compatibility mode.
21972198
*/
21982199
if (old.oprofile_cpu_type != NULL) {
21992200
t->oprofile_cpu_type = old.oprofile_cpu_type;
22002201
t->oprofile_type = old.oprofile_type;
2202+
t->cpu_features |= old.cpu_features & CPU_FTR_PMAO_BUG;
22012203
}
22022204
}
22032205

0 commit comments

Comments
 (0)