aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-07-19 21:02:26 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-20 03:25:52 -0400
commit63b5d7af2556a7de6bf72c5dd0b85a32fb4c3767 (patch)
tree83465d3c04f62c241d08cc7663328374e9edea4d
parent64898a8bad8c94ad7a4bd5cc86b66edfbb081f4a (diff)
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>
-rw-r--r--arch/x86/kernel/numaq_32.c7
-rw-r--r--arch/x86/kernel/setup.c8
-rw-r--r--arch/x86/kernel/time_32.c1
-rw-r--r--arch/x86/mach-default/setup.c10
-rw-r--r--include/asm-x86/arch_hooks.h1
-rw-r--r--include/asm-x86/setup.h1
6 files changed, 20 insertions, 8 deletions
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 7f4e00d1d89..b8c45610b20 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -84,6 +84,12 @@ void __init numaq_tsc_disable(void)
84 } 84 }
85} 85}
86 86
87static int __init numaq_pre_time_init(void)
88{
89 numaq_tsc_disable();
90 return 0;
91}
92
87int found_numaq; 93int found_numaq;
88/* 94/*
89 * Have to match translation table entries to main table entries by counter 95 * Have to match translation table entries to main table entries by counter
@@ -224,6 +230,7 @@ static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable,
224} 230}
225 231
226static struct x86_quirks numaq_x86_quirks __initdata = { 232static struct x86_quirks numaq_x86_quirks __initdata = {
233 .arch_pre_time_init = numaq_pre_time_init,
227 .arch_time_init = NULL, 234 .arch_time_init = NULL,
228 .arch_pre_intr_init = NULL, 235 .arch_pre_intr_init = NULL,
229 .arch_memory_setup = NULL, 236 .arch_memory_setup = NULL,
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index bbcc13d0b56..4064616cfa8 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -853,14 +853,6 @@ void __init setup_arch(char **cmdline_p)
853 init_cpu_to_node(); 853 init_cpu_to_node();
854#endif 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 init_apic_mappings(); 856 init_apic_mappings();
865 ioapic_init_mappings(); 857 ioapic_init_mappings();
866 858
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c
index 059ca6ee59b..ffe3c664afc 100644
--- a/arch/x86/kernel/time_32.c
+++ b/arch/x86/kernel/time_32.c
@@ -129,6 +129,7 @@ void __init hpet_time_init(void)
129 */ 129 */
130void __init time_init(void) 130void __init time_init(void)
131{ 131{
132 pre_time_init_hook();
132 tsc_init(); 133 tsc_init();
133 late_time_init = choose_time_init(); 134 late_time_init = choose_time_init();
134} 135}
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c
index 631dbed9fb9..3d317836be9 100644
--- a/arch/x86/mach-default/setup.c
+++ b/arch/x86/mach-default/setup.c
@@ -103,6 +103,16 @@ static struct irqaction irq0 = {
103}; 103};
104 104
105/** 105/**
106 * pre_time_init_hook - do any specific initialisations before.
107 *
108 **/
109void __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 * time_init_hook - do any specific initialisations for the system timer. 116 * time_init_hook - do any specific initialisations for the system timer.
107 * 117 *
108 * Description: 118 * Description:
diff --git a/include/asm-x86/arch_hooks.h b/include/asm-x86/arch_hooks.h
index 768aee8a04e..8411750ceb6 100644
--- a/include/asm-x86/arch_hooks.h
+++ b/include/asm-x86/arch_hooks.h
@@ -21,6 +21,7 @@ extern void intr_init_hook(void);
21extern void pre_intr_init_hook(void); 21extern void pre_intr_init_hook(void);
22extern void pre_setup_arch_hook(void); 22extern void pre_setup_arch_hook(void);
23extern void trap_init_hook(void); 23extern void trap_init_hook(void);
24extern void pre_time_init_hook(void);
24extern void time_init_hook(void); 25extern void time_init_hook(void);
25extern void mca_nmi_hook(void); 26extern void mca_nmi_hook(void);
26 27
diff --git a/include/asm-x86/setup.h b/include/asm-x86/setup.h
index 2585075da9b..f003ceaad6a 100644
--- a/include/asm-x86/setup.h
+++ b/include/asm-x86/setup.h
@@ -23,6 +23,7 @@ struct mpc_config_processor;
23struct mpc_config_bus; 23struct mpc_config_bus;
24struct mp_config_oemtable; 24struct mp_config_oemtable;
25struct x86_quirks { 25struct x86_quirks {
26 int (*arch_pre_time_init)(void);
26 int (*arch_time_init)(void); 27 int (*arch_time_init)(void);
27 int (*arch_pre_intr_init)(void); 28 int (*arch_pre_intr_init)(void);
28 int (*arch_intr_init)(void); 29 int (*arch_intr_init)(void);