]> git.hungrycats.org Git - linux/commitdiff
[PATCH] x86_64: add notsc option
authorAndi Kleen <ak@muc.de>
Wed, 20 Oct 2004 01:11:41 +0000 (18:11 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 20 Oct 2004 01:11:41 +0000 (18:11 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/time.c

index fcb5919b4c52c8dc7c07dddab03c8f4de87242c2..a33b14f81bdf54eefe6549d9b3838c25cd37a5f2 100644 (file)
@@ -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 */
@@ -918,10 +918,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;
@@ -1217,3 +1220,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);
+
+