diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-07-03 09:32:51 (GMT) |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-03 09:55:12 (GMT) |
commit | b9e5b4e6a991a5a6d521f2e20a65835404b4169f (patch) | |
tree | a0ac972faae4bf9133f576d842667bb134190341 /arch/powerpc/platforms/pseries/setup.c | |
parent | 5a43a066b11ac2fe84cf67307f20b83bea390f83 (diff) | |
download | linux-b9e5b4e6a991a5a6d521f2e20a65835404b4169f.tar.xz |
[POWERPC] Use the genirq framework
This adapts the generic powerpc interrupt handling code, and all of
the platforms except for the embedded 6xx machines, to use the new
genirq framework.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 999509d..476b564 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -118,6 +118,21 @@ static void __init fwnmi_init(void) fwnmi_active = 1; } +void pSeries_8259_cascade(unsigned int irq, struct irq_desc *desc, + struct pt_regs *regs) +{ + unsigned int max = 100; + + while(max--) { + int cascade_irq = i8259_irq(regs); + if (max == 99) + desc->chip->eoi(irq); + if (cascade_irq < 0) + break; + generic_handle_irq(cascade_irq, regs); + }; +} + static void __init pSeries_init_mpic(void) { unsigned int *addrp; @@ -140,7 +155,7 @@ static void __init pSeries_init_mpic(void) i8259_init(intack, 0); /* Hook cascade to mpic */ - mpic_setup_cascade(NUM_ISA_INTERRUPTS, i8259_irq_cascade, NULL); + set_irq_chained_handler(NUM_ISA_INTERRUPTS, pSeries_8259_cascade); } static void __init pSeries_setup_mpic(void) @@ -201,10 +216,8 @@ static void __init pSeries_setup_arch(void) /* Allocate the mpic now, so that find_and_init_phbs() can * fill the ISUs */ pSeries_setup_mpic(); - } else { + } else ppc_md.init_IRQ = xics_init_IRQ; - ppc_md.get_irq = xics_get_irq; - } #ifdef CONFIG_SMP smp_init_pSeries(); @@ -291,10 +304,7 @@ static void pSeries_mach_cpu_die(void) { local_irq_disable(); idle_task_exit(); - /* Some hardware requires clearing the CPPR, while other hardware does not - * it is safe either way - */ - pSeriesLP_cppr_info(0, 0); + xics_teardown_cpu(0); rtas_stop_self(); /* Should never get here... */ BUG(); |