All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: c1e_idle: don't mark TSC unstable if CPU has invariant TSC
@ 2008-09-18 19:12 Andreas Herrmann
  2008-09-18 19:35 ` Valdis.Kletnieks
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Herrmann @ 2008-09-18 19:12 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar; +Cc: linux-kernel

.. otherwise 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.)

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>

---
 arch/x86/kernel/process.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Please apply for 2.6.27.

Thanks,


Andreas


diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 7fc4d5b..ba6b16b 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -265,7 +265,8 @@ static void c1e_idle(void)
 		rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi);
 		if (lo & K8_INTP_C1E_ACTIVE_MASK) {
 			c1e_detected = 1;
-			mark_tsc_unstable("TSC halt in C1E");
+			if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC))
+				mark_tsc_unstable("TSC halt in C1E");
 			printk(KERN_INFO "System has C1E enabled\n");
 		}
 	}
-- 
1.6.0.1




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-23  5:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-18 19:12 [PATCH] x86: c1e_idle: don't mark TSC unstable if CPU has invariant TSC Andreas Herrmann
2008-09-18 19:35 ` Valdis.Kletnieks
2008-09-19 17:20   ` Andreas Herrmann
2008-09-19 18:21     ` Thomas Gleixner
2008-09-20  6:14     ` Ingo Molnar
2008-09-23  5:42       ` Andreas Herrmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.