ppc32: Fix boot on PowerMac
PATCH 1/1 ppc32: Fix boot on PowerMac
Hi !
Tom's recent irq patch broke PowerMac (and possibly others). I think he forgot that PReP, CHRP and PowerMac are all built together in a single kernel image, thus all of those arch_initcall's will end up beeing called, even on the wrong machine...
This fixes it.
arch/ppc/platforms/chrp_setup.c +3 -0
@@ -374,6 +374,9 @@static int __init chrp_request_cascade (void ) { +if (_machine != _MACH_chrp) +return 0 ; +/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */ openpic_hookup_cascade (NUM_8259_INTERRUPTS ,"82c59 cascade" , i8259_irq);
arch/ppc/syslib/i8259.c +6 -0
@@ -13,6 +13,7 @@static spinlock_t i8259_lock =SPIN_LOCK_UNLOCKED ;int i8259_pic_irq_offset; +static int i8259_present;/* * Acknowledge the IRQ using either the PCI host bridge's interrupt
@@ -154,6 +155,9 @@static int __init i8259_hook_cascade (void ) { +if (!i8259_present) +return 0 ; +/* reserve our resources */ request_irq ( i8259_pic_irq_offset +2 , no_action,SA_INTERRUPT ,"82c59 secondary cascade" ,NULL );
@@ -201,4 +205,6 @@if (intack_addr !=0 ) pci_intack =ioremap (intack_addr,1 ); + + i8259_present =1 ; }
arch/ppc/platforms/prep_setup.c +3 -0
@@ -961,6 +961,9 @@static int __init prep_request_cascade (void ) { +if (_machine != _MACH_prep) +return 0 ; +if (OpenPIC_Addr !=NULL )/* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */ openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
Quoted 6 lines · Benjamin Herrenschmidt
Hi !
Tom's recent irq patch broke PowerMac (and possibly others). I think he forgot that PReP, CHRP and PowerMac are all built together in a single kernel image, thus all of those arch_initcall's will end up beeing called, even on the wrong machine...
Better rewvert Tom's fix and switch all these early calls to setup_irq, like I did for pmac and a few other subarches (I missed the ones Tom fixed, sorry)
Quoted 11 lines · Christoph Hellwig
Quoted 6 lines · Benjamin Herrenschmidt
Hi !
Tom's recent irq patch broke PowerMac (and possibly others). I think he forgot that PReP, CHRP and PowerMac are all built together in a single kernel image, thus all of those arch_initcall's will end up beeing called, even on the wrong machine...
Better rewvert Tom's fix and switch all these early calls to
setup_irq, like I did for pmac and a few other subarches (I missed the ones Tom fixed, sorry)
Patch welcome :)
Ben.