]> git.karo-electronics.de Git - linux-beck.git/commitdiff
x86: Move traps_init to x86_init_ops
authorThomas Gleixner <tglx@linutronix.de>
Thu, 20 Aug 2009 08:35:46 +0000 (10:35 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 31 Aug 2009 07:35:45 +0000 (09:35 +0200)
Replace the quirks by a simple x86_init_ops function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/setup.h
arch/x86/include/asm/x86_init.h
arch/x86/kernel/apic/numaq_32.c
arch/x86/kernel/setup.c
arch/x86/kernel/traps.c
arch/x86/kernel/visws_quirks.c
arch/x86/kernel/x86_init.c

index 404086f9411cd4f82e6d6d2e9f719051afc7e47b..7751d1f92bc93e7e812ed7aedcfe3532b60f8cee 100644 (file)
 struct x86_quirks {
        int (*arch_pre_time_init)(void);
        int (*arch_time_init)(void);
-       int (*arch_trap_init)(void);
 };
 
-extern void x86_quirk_trap_init(void);
-
 extern void x86_quirk_pre_time_init(void);
 extern void x86_quirk_time_init(void);
 
index 8d7be65ccf7ff7f6ee84242b884a65fcd3065e59..07c37bd879f8a630343ffa0579e0e94f3be1438e 100644 (file)
@@ -48,10 +48,12 @@ struct x86_init_resources {
  * @pre_vector_init:           init code to run before interrupt vectors
  *                             are set up.
  * @intr_init:                 interrupt init code
+ * @trap_init:                 platform specific trap setup
  */
 struct x86_init_irqs {
        void (*pre_vector_init)(void);
        void (*intr_init)(void);
+       void (*trap_init)(void);
 };
 
 /**
index eafd341e42dde618714d060a02622c63ec56641e..71c5ea6458650913acaee3081fe3a863c2953239 100644 (file)
@@ -265,7 +265,6 @@ static void __init smp_read_mpc_oem(struct mpc_table *mpc)
 static struct x86_quirks numaq_x86_quirks __initdata = {
        .arch_pre_time_init             = numaq_pre_time_init,
        .arch_time_init                 = NULL,
-       .arch_trap_init                 = NULL,
 };
 
 static __init void early_check_numaq(void)
index d3da0f7333f76abd83743c25210d09c6451d6472..bf3b87f1f7dbddf50d9639b94d6f05f7e681da5d 100644 (file)
@@ -1020,21 +1020,6 @@ void __init setup_arch(char **cmdline_p)
 
 #ifdef CONFIG_X86_32
 
-/**
- * x86_quirk_trap_init - initialise system specific traps
- *
- * Description:
- *     Called as the final act of trap_init().  Used in VISWS to initialise
- *     the various board specific APIC traps.
- **/
-void __init x86_quirk_trap_init(void)
-{
-       if (x86_quirks->arch_trap_init) {
-               if (x86_quirks->arch_trap_init())
-                       return;
-       }
-}
-
 static struct irqaction irq0  = {
        .handler = timer_interrupt,
        .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
index 7e4b1f5dec8e129cf1d72f3b8a6f4ee32a78bd39..ed96ed53f69e4401da86f0eb1bfef6def5e993d8 100644 (file)
@@ -59,6 +59,7 @@
 #include <asm/mach_traps.h>
 
 #ifdef CONFIG_X86_64
+#include <asm/x86_init.h>
 #include <asm/pgalloc.h>
 #include <asm/proto.h>
 #else
@@ -980,7 +981,5 @@ void __init trap_init(void)
         */
        cpu_init();
 
-#ifdef CONFIG_X86_32
-       x86_quirk_trap_init();
-#endif
+       x86_init.irqs.trap_init();
 }
index a49013716da974ea149c9a761bcd45d927c2de63..2719091b335138d0b76f28e0fca6e94a1dd3e9f8 100644 (file)
@@ -224,11 +224,10 @@ static void __init visws_find_smp_config(unsigned int reserve)
        mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
 }
 
-static int visws_trap_init(void);
+static void visws_trap_init(void);
 
 static struct x86_quirks visws_x86_quirks __initdata = {
        .arch_time_init         = visws_time_init,
-       .arch_trap_init         = visws_trap_init,
 };
 
 void __init visws_early_detect(void)
@@ -252,6 +251,7 @@ void __init visws_early_detect(void)
        x86_init.mpparse.get_smp_config = visws_get_smp_config;
        x86_init.mpparse.find_smp_config = visws_find_smp_config;
        x86_init.irqs.pre_vector_init = visws_pre_intr_init;
+       x86_init.irqs.trap_init = visws_trap_init;
 
        /*
         * Install reboot quirks:
@@ -390,12 +390,10 @@ static __init void cobalt_init(void)
                co_apic_read(CO_APIC_ID));
 }
 
-static int __init visws_trap_init(void)
+static void __init visws_trap_init(void)
 {
        lithium_init();
        cobalt_init();
-
-       return 1;
 }
 
 /*
index 8cb59332e3b4b4696122a42f0924b4a741d78aa7..9f2b775dc7286a9f0eb88d6d42d3bc7966aa9b0a 100644 (file)
@@ -40,5 +40,6 @@ struct __initdata x86_init_ops x86_init = {
        .irqs = {
                .pre_vector_init        = init_ISA_irqs,
                .intr_init              = native_init_IRQ,
+               .trap_init              = x86_init_noop,
        },
 };