[PATCH][2.5] notsc option needs some attention/TLC

From: Zwane Mwaikambo (zwane@holomorphy.com)
Date: Fri Nov 08 2002 - 23:52:21 EST


notsc doesn't work on a box with a TSC, when we need need the option the
most...

Index: linux-2.5.46-bochs/arch/i386/kernel/cpu/common.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.46/arch/i386/kernel/cpu/common.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 common.c
--- linux-2.5.46-bochs/arch/i386/kernel/cpu/common.c 5 Nov 2002 01:47:31 -0000 1.1.1.1
+++ linux-2.5.46-bochs/arch/i386/kernel/cpu/common.c 9 Nov 2002 03:10:45 -0000
@@ -12,6 +12,11 @@
 
 static int cachesize_override __initdata = -1;
 static int disable_x86_fxsr __initdata = 0;
+#ifdef CONFIG_X86_TSC
+static int tsc_disable __initdata = 0;
+#else
+#define tsc_disable 1
+#endif
 
 struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
 
@@ -42,24 +47,14 @@
 }
 __setup("cachesize=", cachesize_setup);
 
-#ifndef CONFIG_X86_TSC
-static int tsc_disable __initdata = 0;
-
+#ifdef CONFIG_X86_TSC
 static int __init tsc_setup(char *str)
 {
         tsc_disable = 1;
         return 1;
 }
-#else
-#define tsc_disable 0
-
-static int __init tsc_setup(char *str)
-{
- printk("notsc: Kernel compiled with CONFIG_X86_TSC, cannot disable TSC.\n");
- return 1;
-}
-#endif
 __setup("notsc", tsc_setup);
+#endif
 
 int __init get_model_name(struct cpuinfo_x86 *c)
 {

-- 
function.linuxpower.ca

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:17 EST