aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-rw-r--r--arch/powerpc/sysdev/mpic.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index bffe50d02c99..7e469358895f 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -17,7 +17,6 @@
17#undef DEBUG_IRQ 17#undef DEBUG_IRQ
18#undef DEBUG_LOW 18#undef DEBUG_LOW
19 19
20#include <linux/config.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/init.h> 22#include <linux/init.h>
@@ -379,14 +378,14 @@ static inline u32 mpic_physmask(u32 cpumask)
379/* Get the mpic structure from the IPI number */ 378/* Get the mpic structure from the IPI number */
380static inline struct mpic * mpic_from_ipi(unsigned int ipi) 379static inline struct mpic * mpic_from_ipi(unsigned int ipi)
381{ 380{
382 return container_of(irq_desc[ipi].handler, struct mpic, hc_ipi); 381 return container_of(irq_desc[ipi].chip, struct mpic, hc_ipi);
383} 382}
384#endif 383#endif
385 384
386/* Get the mpic structure from the irq number */ 385/* Get the mpic structure from the irq number */
387static inline struct mpic * mpic_from_irq(unsigned int irq) 386static inline struct mpic * mpic_from_irq(unsigned int irq)
388{ 387{
389 return container_of(irq_desc[irq].handler, struct mpic, hc_irq); 388 return container_of(irq_desc[irq].chip, struct mpic, hc_irq);
390} 389}
391 390
392/* Send an EOI */ 391/* Send an EOI */
@@ -541,7 +540,7 @@ static void mpic_end_ipi(unsigned int irq)
541 * IPIs are marked IRQ_PER_CPU. This has the side effect of 540 * IPIs are marked IRQ_PER_CPU. This has the side effect of
542 * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from 541 * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from
543 * applying to them. We EOI them late to avoid re-entering. 542 * applying to them. We EOI them late to avoid re-entering.
544 * We mark IPI's with SA_INTERRUPT as they must run with 543 * We mark IPI's with IRQF_DISABLED as they must run with
545 * irqs disabled. 544 * irqs disabled.
546 */ 545 */
547 mpic_eoi(mpic); 546 mpic_eoi(mpic);
@@ -752,7 +751,7 @@ void __init mpic_init(struct mpic *mpic)
752 if (!(mpic->flags & MPIC_PRIMARY)) 751 if (!(mpic->flags & MPIC_PRIMARY))
753 continue; 752 continue;
754 irq_desc[mpic->ipi_offset+i].status |= IRQ_PER_CPU; 753 irq_desc[mpic->ipi_offset+i].status |= IRQ_PER_CPU;
755 irq_desc[mpic->ipi_offset+i].handler = &mpic->hc_ipi; 754 irq_desc[mpic->ipi_offset+i].chip = &mpic->hc_ipi;
756#endif /* CONFIG_SMP */ 755#endif /* CONFIG_SMP */
757 } 756 }
758 757
@@ -813,7 +812,7 @@ void __init mpic_init(struct mpic *mpic)
813 /* init linux descriptors */ 812 /* init linux descriptors */
814 if (i < mpic->irq_count) { 813 if (i < mpic->irq_count) {
815 irq_desc[mpic->irq_offset+i].status = level ? IRQ_LEVEL : 0; 814 irq_desc[mpic->irq_offset+i].status = level ? IRQ_LEVEL : 0;
816 irq_desc[mpic->irq_offset+i].handler = &mpic->hc_irq; 815 irq_desc[mpic->irq_offset+i].chip = &mpic->hc_irq;
817 } 816 }
818 } 817 }
819 818
@@ -906,7 +905,7 @@ void mpic_setup_this_cpu(void)
906 /* let the mpic know we want intrs. default affinity is 0xffffffff 905 /* let the mpic know we want intrs. default affinity is 0xffffffff
907 * until changed via /proc. That's how it's done on x86. If we want 906 * until changed via /proc. That's how it's done on x86. If we want
908 * it differently, then we should make sure we also change the default 907 * it differently, then we should make sure we also change the default
909 * values of irq_affinity in irq.c. 908 * values of irq_desc[].affinity in irq.c.
910 */ 909 */
911 if (distribute_irqs) { 910 if (distribute_irqs) {
912 for (i = 0; i < mpic->num_sources ; i++) 911 for (i = 0; i < mpic->num_sources ; i++)
@@ -1028,14 +1027,17 @@ void mpic_request_ipis(void)
1028 1027
1029 printk("requesting IPIs ... \n"); 1028 printk("requesting IPIs ... \n");
1030 1029
1031 /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ 1030 /*
1032 request_irq(mpic->ipi_offset+0, mpic_ipi_action, SA_INTERRUPT, 1031 * IPIs are marked IRQF_DISABLED as they must run with irqs
1032 * disabled
1033 */
1034 request_irq(mpic->ipi_offset+0, mpic_ipi_action, IRQF_DISABLED,
1033 "IPI0 (call function)", mpic); 1035 "IPI0 (call function)", mpic);
1034 request_irq(mpic->ipi_offset+1, mpic_ipi_action, SA_INTERRUPT, 1036 request_irq(mpic->ipi_offset+1, mpic_ipi_action, IRQF_DISABLED,
1035 "IPI1 (reschedule)", mpic); 1037 "IPI1 (reschedule)", mpic);
1036 request_irq(mpic->ipi_offset+2, mpic_ipi_action, SA_INTERRUPT, 1038 request_irq(mpic->ipi_offset+2, mpic_ipi_action, IRQF_DISABLED,
1037 "IPI2 (unused)", mpic); 1039 "IPI2 (unused)", mpic);
1038 request_irq(mpic->ipi_offset+3, mpic_ipi_action, SA_INTERRUPT, 1040 request_irq(mpic->ipi_offset+3, mpic_ipi_action, IRQF_DISABLED,
1039 "IPI3 (debugger break)", mpic); 1041 "IPI3 (debugger break)", mpic);
1040 1042
1041 printk("IPIs requested... \n"); 1043 printk("IPIs requested... \n");