Signed-off-by: Andrew Morton --- arch/i386/kernel/i8259.c | 26 ++++++++++++++++++------ arch/i386/mach-default/setup.c | 30 +++------------------------- arch/i386/mach-visws/setup.c | 9 -------- arch/i386/mach-visws/visws_apic.c | 7 ------ arch/i386/mach-voyager/setup.c | 13 ------------ include/asm-i386/arch_hooks.h | 1 6 files changed, 26 insertions(+), 60 deletions(-) diff -puN arch/i386/kernel/i8259.c~x86_64-mm-paravirt-subarch-cleanup arch/i386/kernel/i8259.c --- a/arch/i386/kernel/i8259.c~x86_64-mm-paravirt-subarch-cleanup +++ a/arch/i386/kernel/i8259.c @@ -350,7 +350,18 @@ static irqreturn_t math_error_irq(int cp * New motherboards sometimes make IRQ 13 be a PCI interrupt, * so allow interrupt sharing. */ -static struct irqaction fpu_irq = { math_error_irq, 0, CPU_MASK_NONE, "fpu", NULL, NULL }; +static struct irqaction fpu_irq = { + .handler = math_error_irq, + .name = "fpu" +}; + +/* + * Most legacy systems want to cascade IRQ2 to slave PIC + */ +static struct irqaction cascade_action = { + .handler = no_action, + .name = "cascade", +}; void __init init_ISA_irqs (void) { @@ -385,9 +396,6 @@ void __init init_IRQ(void) { int i; - /* all the set up before the call gates are initialised */ - pre_intr_init_hook(); - /* * Cover the whole vector space, no vector can escape * us. (some of these will be overridden and become @@ -401,10 +409,16 @@ void __init init_IRQ(void) set_intr_gate(vector, interrupt[i]); } - /* setup after call gates are initialised (usually add in - * the architecture specific gates) + /* + * setup after interrupt gates are initialised (usually add in + * the architecture specific gates) and initialize controllers */ intr_init_hook(); +#ifdef CONFIG_X86_LOCAL_APIC + apic_intr_init(); +#endif + if (!acpi_ioapic) + setup_irq(2, &cascade_action); /* * Set the clock to HZ Hz, we already have a valid diff -puN arch/i386/mach-default/setup.c~x86_64-mm-paravirt-subarch-cleanup arch/i386/mach-default/setup.c --- a/arch/i386/mach-default/setup.c~x86_64-mm-paravirt-subarch-cleanup +++ a/arch/i386/mach-default/setup.c @@ -18,24 +18,6 @@ int no_broadcast=DEFAULT_SEND_IPI; -/** - * pre_intr_init_hook - 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. - **/ -void __init pre_intr_init_hook(void) -{ - init_ISA_irqs(); -} - -/* - * IRQ2 is cascade interrupt to second interrupt controller - */ -static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL}; /** * intr_init_hook - post gate setup interrupt initialisation @@ -43,17 +25,13 @@ static struct irqaction irq2 = { no_acti * Description: * Fill in any interrupts that may have been left out by the general * init_IRQ() routine. interrupts having to do with the machine rather - * than the devices on the I/O bus (like APIC interrupts in intel MP - * systems) are started here. + * than the devices on the I/O bus are started here. For legacy reasons, + * the ISA interrupts should be initialised here if the machine emulates + * a PC in any way. **/ void __init intr_init_hook(void) { -#ifdef CONFIG_X86_LOCAL_APIC - apic_intr_init(); -#endif - - if (!acpi_ioapic) - setup_irq(2, &irq2); + init_ISA_irqs(); } /** diff -puN arch/i386/mach-visws/setup.c~x86_64-mm-paravirt-subarch-cleanup arch/i386/mach-visws/setup.c --- a/arch/i386/mach-visws/setup.c~x86_64-mm-paravirt-subarch-cleanup +++ a/arch/i386/mach-visws/setup.c @@ -96,16 +96,9 @@ void __init visws_get_board_type_and_rev "unknown")), visws_board_rev); } -void __init pre_intr_init_hook(void) -{ - init_VISWS_APIC_irqs(); -} - void __init intr_init_hook(void) { -#ifdef CONFIG_X86_LOCAL_APIC - apic_intr_init(); -#endif + init_VISWS_APIC_irqs(); } void __init pre_setup_arch_hook() diff -puN arch/i386/mach-visws/visws_apic.c~x86_64-mm-paravirt-subarch-cleanup arch/i386/mach-visws/visws_apic.c --- a/arch/i386/mach-visws/visws_apic.c~x86_64-mm-paravirt-subarch-cleanup +++ a/arch/i386/mach-visws/visws_apic.c @@ -260,12 +260,6 @@ static struct irqaction master_action = .name = "PIIX4-8259", }; -static struct irqaction cascade_action = { - .handler = no_action, - .name = "cascade", -}; - - void init_VISWS_APIC_irqs(void) { int i; @@ -296,5 +290,4 @@ void init_VISWS_APIC_irqs(void) } setup_irq(CO_IRQ_8259, &master_action); - setup_irq(2, &cascade_action); } diff -puN arch/i386/mach-voyager/setup.c~x86_64-mm-paravirt-subarch-cleanup arch/i386/mach-voyager/setup.c --- a/arch/i386/mach-voyager/setup.c~x86_64-mm-paravirt-subarch-cleanup +++ a/arch/i386/mach-voyager/setup.c @@ -10,23 +10,12 @@ #include #include -void __init pre_intr_init_hook(void) -{ - init_ISA_irqs(); -} - -/* - * IRQ2 is cascade interrupt to second interrupt controller - */ -static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL}; - void __init intr_init_hook(void) { + init_ISA_irqs(); #ifdef CONFIG_SMP smp_intr_init(); #endif - - setup_irq(2, &irq2); } void __init pre_setup_arch_hook(void) diff -puN include/asm-i386/arch_hooks.h~x86_64-mm-paravirt-subarch-cleanup include/asm-i386/arch_hooks.h --- a/include/asm-i386/arch_hooks.h~x86_64-mm-paravirt-subarch-cleanup +++ a/include/asm-i386/arch_hooks.h @@ -18,7 +18,6 @@ extern irqreturn_t timer_interrupt(int i /* these are the defined hooks */ 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 time_init_hook(void); _