Skip to contentSkip to conversation

re-disable TSC on NUMAQ

PATCH New Dave Hansen 1 participant 1 message Jul 28, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 re-disable TSC on NUMAQ

Somewhere recently, the TSC got re-enabled for timekeeping on NUMAQ machines. However, the hardware makes these get unsynchronized quite badly. So badly, in fact, that the code to fix up the skew can just hang on boot.

This patch re-disables them. It's nicely confined to the numaq.c file. It would be great if this could make it into 2.6.13, I think it counts as a bugfix.

Tested on a 16-proc 4-node NUMAQ.

-- Dave

 memhotplug-dave/arch/i386/kernel/numaq.c |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -puN arch/i386/mach-default/setup.c~numaq-tsc-disable arch/i386/mach-default/setup.c diff -L arch/i386/mach-default/setup.c.orig -puN /dev/null /dev/null
diff -L p -puN /dev/null /dev/null

arch/i386/kernel/numaq.c renamed from arch/i386/kernel/numaq.c~numaq-tsc-disable +9 -0
diff -puN arch/i386/kernel/numaq.c~numaq-tsc-disable arch/i386/kernel/numaq.c
@@ -31,6 +31,7 @@
 #include <linux/nodemask.h>
 #include <asm/numaq.h>
 #include <asm/topology.h>
+#include <asm/processor.h>
 
 #define	MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT))
 
@@ -77,3 +78,11 @@ int __init get_memcfg_numaq(void)
 	smp_dump_qct();
 	return 1;
 }
+
+static int __init numaq_dsc_disable(void)
+{
+	printk(KERN_DEBUG "NUMAQ: disabling TSC\n");
+	tsc_disable = 1;
+	return 0;
+}
+core_initcall(numaq_dsc_disable);

_

arch/i386/mach-default/setup.c renamed from arch/i386/mach-default/setup.c.orig +3 -0
@@ -66,6 +66,9 @@
  **/
 void __init pre_setup_arch_hook(void)
 {
+#ifdef CONFIG_X86_NUMAQ
+	tsc_disable = 1;
+#endif
 }
 
 /**