Commit f2a43f1a authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: add notsc option

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: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 845d4284
......@@ -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);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment