]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: add ->pre_time_init to x86_quirks
authorYinghai Lu <yhlu.kernel@gmail.com>
Sun, 20 Jul 2008 01:02:26 +0000 (18:02 -0700)
committerIngo Molnar <mingo@elte.hu>
Sun, 20 Jul 2008 07:25:52 +0000 (09:25 +0200)
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>
arch/x86/kernel/numaq_32.c
arch/x86/kernel/setup.c
arch/x86/kernel/time_32.c
arch/x86/mach-default/setup.c
include/asm-x86/arch_hooks.h
include/asm-x86/setup.h

index 7f4e00d1d8931e2cbd567e4a350a9a7786bcd42c..b8c45610b20a89a6f52f9b266d68de042d688168 100644 (file)
@@ -84,6 +84,12 @@ void __init numaq_tsc_disable(void)
        }
 }
 
+static int __init numaq_pre_time_init(void)
+{
+       numaq_tsc_disable();
+       return 0;
+}
+
 int found_numaq;
 /*
  * 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,
 }
 
 static struct x86_quirks numaq_x86_quirks __initdata = {
+       .arch_pre_time_init     = numaq_pre_time_init,
        .arch_time_init         = NULL,
        .arch_pre_intr_init     = NULL,
        .arch_memory_setup      = NULL,
index bbcc13d0b5696b2a239c07d2de6f664d79c6ad99..4064616cfa8516abc81fa5d9d9597ea6cecea35e 100644 (file)
@@ -853,14 +853,6 @@ void __init setup_arch(char **cmdline_p)
        init_cpu_to_node();
 #endif
 
-#ifdef CONFIG_X86_NUMAQ
-       /*
-        * need to check online nodes num, call it
-        * here before time_init/tsc_init
-        */
-       numaq_tsc_disable();
-#endif
-
        init_apic_mappings();
        ioapic_init_mappings();
 
index 059ca6ee59b4f1bbc9d0eafe4c1f2b3977f17e79..ffe3c664afc0aae1318c1b26ab272f858d87812b 100644 (file)
@@ -129,6 +129,7 @@ void __init hpet_time_init(void)
  */
 void __init time_init(void)
 {
+       pre_time_init_hook();
        tsc_init();
        late_time_init = choose_time_init();
 }
index 631dbed9fb9d47493fb4ff8923c79216078226ae..3d317836be9ed9e1739e92461d0912dc37c65ffb 100644 (file)
@@ -102,6 +102,16 @@ static struct irqaction irq0  = {
        .name = "timer"
 };
 
+/**
+ * pre_time_init_hook - do any specific initialisations before.
+ *
+ **/
+void __init pre_time_init_hook(void)
+{
+       if (x86_quirks->arch_pre_time_init)
+               x86_quirks->arch_pre_time_init();
+}
+
 /**
  * time_init_hook - do any specific initialisations for the system timer.
  *
index 768aee8a04ef85c5cf1c6ee1b22fa0ebcf3dc60d..8411750ceb633763ad2fda66d8f154f9b87cfd7f 100644 (file)
@@ -21,6 +21,7 @@ extern void intr_init_hook(void);
 extern void pre_intr_init_hook(void);
 extern void pre_setup_arch_hook(void);
 extern void trap_init_hook(void);
+extern void pre_time_init_hook(void);
 extern void time_init_hook(void);
 extern void mca_nmi_hook(void);
 
index 2585075da9b41f61cd23b1516258fbf2ff2fba57..f003ceaad6af8337961cc02d3ebfff1585443a28 100644 (file)
@@ -23,6 +23,7 @@ struct mpc_config_processor;
 struct mpc_config_bus;
 struct mp_config_oemtable;
 struct x86_quirks {
+       int (*arch_pre_time_init)(void);
        int (*arch_time_init)(void);
        int (*arch_pre_intr_init)(void);
        int (*arch_intr_init)(void);