aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-12-22 05:55:37 -0500
committerPaul Mackerras <paulus@samba.org>2005-12-22 05:55:37 -0500
commit8b1af56b29b9b81538b4d0d4fd9515618618ead1 (patch)
treea0075fc5af002bc26b6e8217ccb80b92e6bf2b65 /arch/powerpc
parentd5ea4e26602fa7f5141872f2c17a862f1974a73f (diff)
powerpc: Fix i8259 cascade on pSeries with XICS interrupt controller
It turns out that commit f9bd170a87948a9e077149b70fb192c563770fdf broke the cascade from XICS to i8259 on pSeries machines; specifically we ended up not ever doing the EOI on the XICS for the cascade. The result was that interrupts from the serial ports (and presumably any other devices using ISA interrupts) didn't get through. This fixes it and also simplifies the code, by doing the EOI on the XICS in the xics_get_irq routine after reading and acking the interrupt on the i8259. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/pseries/xics.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 72ac18067ece..0377decc0719 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -48,11 +48,6 @@ static struct hw_interrupt_type xics_pic = {
48 .set_affinity = xics_set_affinity 48 .set_affinity = xics_set_affinity
49}; 49};
50 50
51static struct hw_interrupt_type xics_8259_pic = {
52 .typename = " XICS/8259",
53 .ack = xics_mask_and_ack_irq,
54};
55
56/* This is used to map real irq numbers to virtual */ 51/* This is used to map real irq numbers to virtual */
57static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC); 52static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC);
58 53
@@ -367,12 +362,7 @@ int xics_get_irq(struct pt_regs *regs)
367 /* for sanity, this had better be < NR_IRQS - 16 */ 362 /* for sanity, this had better be < NR_IRQS - 16 */
368 if (vec == xics_irq_8259_cascade_real) { 363 if (vec == xics_irq_8259_cascade_real) {
369 irq = i8259_irq(regs); 364 irq = i8259_irq(regs);
370 if (irq == -1) { 365 xics_end_irq(irq_offset_up(xics_irq_8259_cascade));
371 /* Spurious cascaded interrupt. Still must ack xics */
372 xics_end_irq(irq_offset_up(xics_irq_8259_cascade));
373
374 irq = -1;
375 }
376 } else if (vec == XICS_IRQ_SPURIOUS) { 366 } else if (vec == XICS_IRQ_SPURIOUS) {
377 irq = -1; 367 irq = -1;
378 } else { 368 } else {
@@ -542,6 +532,7 @@ nextnode:
542 xics_irq_8259_cascade_real = *ireg; 532 xics_irq_8259_cascade_real = *ireg;
543 xics_irq_8259_cascade 533 xics_irq_8259_cascade
544 = virt_irq_create_mapping(xics_irq_8259_cascade_real); 534 = virt_irq_create_mapping(xics_irq_8259_cascade_real);
535 i8259_init(0, 0);
545 of_node_put(np); 536 of_node_put(np);
546 } 537 }
547 538
@@ -565,12 +556,7 @@ nextnode:
565#endif /* CONFIG_SMP */ 556#endif /* CONFIG_SMP */
566 } 557 }
567 558
568 xics_8259_pic.enable = i8259_pic.enable; 559 for (i = irq_offset_value(); i < NR_IRQS; ++i)
569 xics_8259_pic.disable = i8259_pic.disable;
570 xics_8259_pic.end = i8259_pic.end;
571 for (i = 0; i < 16; ++i)
572 get_irq_desc(i)->handler = &xics_8259_pic;
573 for (; i < NR_IRQS; ++i)
574 get_irq_desc(i)->handler = &xics_pic; 560 get_irq_desc(i)->handler = &xics_pic;
575 561
576 xics_setup_cpu(); 562 xics_setup_cpu();
@@ -590,7 +576,6 @@ static int __init xics_setup_i8259(void)
590 no_action, 0, "8259 cascade", NULL)) 576 no_action, 0, "8259 cascade", NULL))
591 printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 " 577 printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 "
592 "cascade\n"); 578 "cascade\n");
593 i8259_init(0, 0);
594 } 579 }
595 return 0; 580 return 0;
596} 581}