Skip to content

Commit a8383df

Browse files
CodyYao-ocPeter Zijlstra
authored andcommitted
x86/nmi_watchdog: Fix old-style NMI watchdog regression on old Intel CPUs
The following commit: 3a4ac12 ("x86/perf: Add hardware performance events support for Zhaoxin CPU.") Got the old-style NMI watchdog logic wrong and broke it for basically every Intel CPU where it was active. Which is only truly old CPUs, so few people noticed. On CPUs with perf events support we turn off the old-style NMI watchdog, so it was pretty pointless to add the logic for X86_VENDOR_ZHAOXIN to begin with ... :-/ Anyway, the fix is to restore the old logic and add a 'break'. [ mingo: Wrote a new changelog. ] Fixes: 3a4ac12 ("x86/perf: Add hardware performance events support for Zhaoxin CPU.") Signed-off-by: CodyYao-oc <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 156172a commit a8383df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kernel/cpu/perfctr-watchdog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static inline unsigned int nmi_perfctr_msr_to_bit(unsigned int msr)
6363
case 15:
6464
return msr - MSR_P4_BPU_PERFCTR0;
6565
}
66-
fallthrough;
66+
break;
6767
case X86_VENDOR_ZHAOXIN:
6868
case X86_VENDOR_CENTAUR:
6969
return msr - MSR_ARCH_PERFMON_PERFCTR0;
@@ -96,7 +96,7 @@ static inline unsigned int nmi_evntsel_msr_to_bit(unsigned int msr)
9696
case 15:
9797
return msr - MSR_P4_BSU_ESCR0;
9898
}
99-
fallthrough;
99+
break;
100100
case X86_VENDOR_ZHAOXIN:
101101
case X86_VENDOR_CENTAUR:
102102
return msr - MSR_ARCH_PERFMON_EVENTSEL0;

0 commit comments

Comments
 (0)