diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-07-13 01:52:55 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-13 02:19:45 -0400 |
commit | 3d88cca7085cffce077f808f36551e9050eb9e3a (patch) | |
tree | 6bdd386b67e0935b4c3c51b6ec31e40471cf3745 /arch/x86 | |
parent | 7b479becdb8c1fb4ff6fbb2a4076c471c737b54c (diff) |
x86: fix numaq_tsc_disable calling
got this on a test-system:
calling numaq_tsc_disable+0x0/0x39
NUMAQ: disabling TSC
initcall numaq_tsc_disable+0x0/0x39 returned 0 after 0 msecs
that's because we should not be using arch_initcall to call numaq_tsc_disable.
need to call it in setup_arch before time_init()/tsc_init()
and call it in init_intel() to make the cpu feature bits right.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/numaq_32.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 8 |
3 files changed, 16 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index fe9224c51d37..70609efdf1da 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -226,6 +226,10 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
226 | 226 | ||
227 | if (cpu_has_bts) | 227 | if (cpu_has_bts) |
228 | ds_init_intel(c); | 228 | ds_init_intel(c); |
229 | |||
230 | #ifdef CONFIG_X86_NUMAQ | ||
231 | numaq_tsc_disable(); | ||
232 | #endif | ||
229 | } | 233 | } |
230 | 234 | ||
231 | static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 *c, unsigned int size) | 235 | static unsigned int __cpuinit intel_size_cache(struct cpuinfo_x86 *c, unsigned int size) |
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c index f0f1de1c4a1d..5b20a5e7ac28 100644 --- a/arch/x86/kernel/numaq_32.c +++ b/arch/x86/kernel/numaq_32.c | |||
@@ -93,12 +93,13 @@ int __init get_memcfg_numaq(void) | |||
93 | return 1; | 93 | return 1; |
94 | } | 94 | } |
95 | 95 | ||
96 | static int __init numaq_tsc_disable(void) | 96 | void __init numaq_tsc_disable(void) |
97 | { | 97 | { |
98 | if (!found_numaq) | ||
99 | return -1; | ||
100 | |||
98 | if (num_online_nodes() > 1) { | 101 | if (num_online_nodes() > 1) { |
99 | printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); | 102 | printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); |
100 | setup_clear_cpu_cap(X86_FEATURE_TSC); | 103 | setup_clear_cpu_cap(X86_FEATURE_TSC); |
101 | } | 104 | } |
102 | return 0; | ||
103 | } | 105 | } |
104 | arch_initcall(numaq_tsc_disable); | ||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 987b6fde3a99..36c540d4ac4b 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -849,6 +849,14 @@ void __init setup_arch(char **cmdline_p) | |||
849 | init_cpu_to_node(); | 849 | init_cpu_to_node(); |
850 | #endif | 850 | #endif |
851 | 851 | ||
852 | #ifdef CONFIG_X86_NUMAQ | ||
853 | /* | ||
854 | * need to check online nodes num, call it | ||
855 | * here before time_init/tsc_init | ||
856 | */ | ||
857 | numaq_tsc_disable(); | ||
858 | #endif | ||
859 | |||
852 | init_apic_mappings(); | 860 | init_apic_mappings(); |
853 | ioapic_init_mappings(); | 861 | ioapic_init_mappings(); |
854 | 862 | ||