Skip to content

Commit 09bfeea

Browse files
Andreas HerrmannKAGA-KOKO
authored andcommitted
x86: c1e_idle: don't mark TSC unstable if CPU has invariant TSC
Impact: Functional TSC is marked unstable on AMD family 0x10 and 0x11 CPUs. This would be wrong because for those CPUs "invariant TSC" means: "The TSC counts at the same rate in all P-states, all C states, S0, or S1" (See "Processor BIOS and Kernel Developer's Guides" for those CPUs.) [ tglx: Changed C1E to AMD C1E in the printks to avoid confusion with Intel C1E ] Signed-off-by: Andreas Herrmann <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent a8d6829 commit 09bfeea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/x86/kernel/process.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,9 @@ static void c1e_idle(void)
270270
rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi);
271271
if (lo & K8_INTP_C1E_ACTIVE_MASK) {
272272
c1e_detected = 1;
273-
mark_tsc_unstable("TSC halt in C1E");
274-
printk(KERN_INFO "System has C1E enabled\n");
273+
if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC))
274+
mark_tsc_unstable("TSC halt in AMD C1E");
275+
printk(KERN_INFO "System has AMD C1E enabled\n");
275276
set_cpu_cap(&boot_cpu_data, X86_FEATURE_AMDC1E);
276277
}
277278
}

0 commit comments

Comments
 (0)