Commit 0355478a authored by Andrew Morton's avatar Andrew Morton Committed by David S. Miller

[PATCH] Don't panic if TSC is enabled and notsc is used

Patch from: john stultz <johnstul@us.ibm.com>

The kernel will currently panic if it was built with CONFIG_X86_TSC and
someone boots it with `notsc'.

Change it to just print a warning.
parent a8dd6484
......@@ -299,6 +299,7 @@ static int init_tsc(void)
return -ENODEV;
}
#ifndef CONFIG_X86_TSC
/* disable flag for tsc. Takes effect by clearing the TSC cpu flag
* in cpu/common.c */
static int __init tsc_setup(char *str)
......@@ -306,7 +307,14 @@ static int __init tsc_setup(char *str)
tsc_disable = 1;
return 1;
}
#else
static int __init tsc_setup(char *str)
{
printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, "
"cannot disable TSC.\n");
return 1;
}
#endif
__setup("notsc", tsc_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