extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
extern int vector_used_by_percpu_irq(unsigned int vector);
+extern void init_ISA_irqs(void);
+
#endif /* _ASM_X86_IRQ_H */
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);
int (*arch_trap_init)(void);
};
char *(*memory_setup)(void);
};
+/**
+ * struct x86_init_irqs - platform specific interrupt setup
+ * @pre_vector_init: init code to run before interrupt vectors
+ * are set up.
+ */
+struct x86_init_irqs {
+ void (*pre_vector_init)(void);
+};
+
/**
* struct x86_init_ops - functions for platform specific setup
*
struct x86_init_ops {
struct x86_init_resources resources;
struct x86_init_mpparse mpparse;
+ struct x86_init_irqs irqs;
};
extern struct x86_init_ops x86_init;
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_intr_init = NULL,
.arch_trap_init = NULL,
};
return 0;
}
-static void __init init_ISA_irqs(void)
+void __init init_ISA_irqs(void)
{
int i;
#endif
}
-/**
- * x86_quirk_pre_intr_init - initialisation prior to setting up interrupt vectors
- *
- * Description:
- * Perform any necessary interrupt initialisation prior to setting up
- * the "ordinary" interrupt call gates. For legacy reasons, the ISA
- * interrupts should be initialised here if the machine emulates a PC
- * in any way.
- **/
-static void __init x86_quirk_pre_intr_init(void)
-{
-#ifdef CONFIG_X86_32
- if (x86_quirks->arch_pre_intr_init) {
- if (x86_quirks->arch_pre_intr_init())
- return;
- }
-#endif
- init_ISA_irqs();
-}
-
void __init native_init_IRQ(void)
{
int i;
/* Execute any quirks before the call gates are initialised: */
- x86_quirk_pre_intr_init();
+ x86_init.irqs.pre_vector_init();
apic_intr_init();
return 0;
}
-static int __init visws_pre_intr_init(void)
+/* Replaces the default init_ISA_irqs in the generic setup */
+static void __init visws_pre_intr_init(void)
{
init_VISWS_APIC_irqs();
-
- /*
- * We dont want ISA irqs to be set up by the generic code:
- */
- return 1;
}
/* Quirk for machine specific memory setup. */
static struct x86_quirks visws_x86_quirks __initdata = {
.arch_time_init = visws_time_init,
- .arch_pre_intr_init = visws_pre_intr_init,
.arch_intr_init = NULL,
.arch_trap_init = visws_trap_init,
};
x86_init.resources.memory_setup = visws_memory_setup;
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;
/*
* Install reboot quirks:
#include <asm/mpspec.h>
#include <asm/setup.h>
#include <asm/e820.h>
+#include <asm/irq.h>
void __cpuinit x86_init_noop(void) { }
void __init x86_init_uint_noop(unsigned int unused) { }
.find_smp_config = default_find_smp_config,
.get_smp_config = default_get_smp_config,
},
+
+ .irqs = {
+ .pre_vector_init = init_ISA_irqs,
+ },
};