Replace the quirks by a simple x86_init_ops function.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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);
* @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);
};
/**
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)
#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,
#include <asm/mach_traps.h>
#ifdef CONFIG_X86_64
+#include <asm/x86_init.h>
#include <asm/pgalloc.h>
#include <asm/proto.h>
#else
*/
cpu_init();
-#ifdef CONFIG_X86_32
- x86_quirk_trap_init();
-#endif
+ x86_init.irqs.trap_init();
}
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)
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:
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;
}
/*
.irqs = {
.pre_vector_init = init_ISA_irqs,
.intr_init = native_init_IRQ,
+ .trap_init = x86_init_noop,
},
};