Skip to contentSkip to conversation

notsc-warning_A0

PATCH New john stultz 1 participant 1 message Aug 19, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 notsc-warning_A0

Marcelo,
This patch simply prints a warning message when "notsc" is passed to a
kernel that is compiled w/ CONFIG_X86_TSC, and thus ignores the boot option (Also renames tsc_setup -> notsc_setup).

thanks
-john

arch/i386/kernel/setup.c +8 -3
diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
@@ -1138,14 +1138,19 @@
 #ifndef CONFIG_X86_TSC
 static int tsc_disable __initdata = 0;
 
-static int __init tsc_setup(char *str)
+static int __init notsc_setup(char *str)
 {
 	tsc_disable = 1;
 	return 1;
 }
-
-__setup("notsc", tsc_setup);
+#else
+static int __init notsc_setup(char *str)
+{
+	printk("notsc: Kernel compiled with CONFIG_X86_TSC, cannot disable TSC.\n");
+	return 1;
+}
 #endif
+__setup("notsc", notsc_setup);
 
 static int __init highio_setup(char *str)
 {