Commit 63b5d7af2556a7de6bf72c5dd0b85a32fb4c3767
Committed by
Ingo Molnar
1 parent
64898a8bad
Exists in
master
and in
7 other branches
x86: add ->pre_time_init to x86_quirks
so NUMAQ can use that to call numaq_pre_time_init() This allows us to remove a NUMAQ special from arch/x86/kernel/setup.c. (and paves the way to remove the NUMAQ subarch) Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 6 changed files with 20 additions and 8 deletions Side-by-side Diff
arch/x86/kernel/numaq_32.c
... | ... | @@ -84,6 +84,12 @@ |
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | +static int __init numaq_pre_time_init(void) | |
88 | +{ | |
89 | + numaq_tsc_disable(); | |
90 | + return 0; | |
91 | +} | |
92 | + | |
87 | 93 | int found_numaq; |
88 | 94 | /* |
89 | 95 | * Have to match translation table entries to main table entries by counter |
... | ... | @@ -224,6 +230,7 @@ |
224 | 230 | } |
225 | 231 | |
226 | 232 | static struct x86_quirks numaq_x86_quirks __initdata = { |
233 | + .arch_pre_time_init = numaq_pre_time_init, | |
227 | 234 | .arch_time_init = NULL, |
228 | 235 | .arch_pre_intr_init = NULL, |
229 | 236 | .arch_memory_setup = NULL, |
arch/x86/kernel/setup.c
... | ... | @@ -853,14 +853,6 @@ |
853 | 853 | init_cpu_to_node(); |
854 | 854 | #endif |
855 | 855 | |
856 | -#ifdef CONFIG_X86_NUMAQ | |
857 | - /* | |
858 | - * need to check online nodes num, call it | |
859 | - * here before time_init/tsc_init | |
860 | - */ | |
861 | - numaq_tsc_disable(); | |
862 | -#endif | |
863 | - | |
864 | 856 | init_apic_mappings(); |
865 | 857 | ioapic_init_mappings(); |
866 | 858 |
arch/x86/kernel/time_32.c
arch/x86/mach-default/setup.c
... | ... | @@ -103,6 +103,16 @@ |
103 | 103 | }; |
104 | 104 | |
105 | 105 | /** |
106 | + * pre_time_init_hook - do any specific initialisations before. | |
107 | + * | |
108 | + **/ | |
109 | +void __init pre_time_init_hook(void) | |
110 | +{ | |
111 | + if (x86_quirks->arch_pre_time_init) | |
112 | + x86_quirks->arch_pre_time_init(); | |
113 | +} | |
114 | + | |
115 | +/** | |
106 | 116 | * time_init_hook - do any specific initialisations for the system timer. |
107 | 117 | * |
108 | 118 | * Description: |
include/asm-x86/arch_hooks.h
include/asm-x86/setup.h