From: Andi Kleen <ak@muc.de>

[Relative to the previous patch to use TSC on SMP EM64T machines]

Add an notsc option so that it can be turned off again.

This may be useful on the Summit, but will only work when there is a HPET
fallback.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/x86_64/kernel/time.c |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff -puN arch/x86_64/kernel/time.c~add-notsc-option-to-x86-64 arch/x86_64/kernel/time.c
--- 25/arch/x86_64/kernel/time.c~add-notsc-option-to-x86-64	Tue Oct  5 14:36:59 2004
+++ 25-akpm/arch/x86_64/kernel/time.c	Tue Oct  5 14:36:59 2004
@@ -53,10 +53,10 @@ spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED
 spinlock_t i8253_lock = SPIN_LOCK_UNLOCKED;
 
 static int nohpet __initdata = 0;
+static int notsc __initdata = 0;
 
 #undef HPET_HACK_ENABLE_DANGEROUS
 
-
 unsigned int cpu_khz;					/* TSC clocks / usec, not used here */
 unsigned long hpet_period;				/* fsecs / HPET clock */
 unsigned long hpet_tick;				/* HPET clocks / interrupt */
@@ -913,10 +913,13 @@ void __init time_init_smp(void)
 	 * Exceptions:
 	 * IBM Summit. Will need to be special cased later.
  	 * AMD dual core may also not need HPET. Check me.
+	 *
+	 * Can be turned off with "notsc".
 	 */
-	if (vxtime.hpet_address &&
-	    num_online_cpus() > 1 &&
-	    boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
+	if (num_online_cpus() > 1 &&
+	    boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
+		notsc = 1;
+	if (vxtime.hpet_address && notsc) {
 		timetype = "HPET";
 		vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
 		vxtime.mode = VXTIME_HPET;
@@ -1212,3 +1215,14 @@ static int __init nohpet_setup(char *s) 
 } 
 
 __setup("nohpet", nohpet_setup);
+
+
+static int __init notsc_setup(char *s)
+{
+	notsc = 1;
+	return 0;
+}
+
+__setup("notsc", notsc_setup);
+
+
_