diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-06 15:45:52 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-10 11:22:14 -0500 |
commit | 4c4231ea2f794d73bbb50b8d84e00c66a012a607 (patch) | |
tree | 4c2470ea880a75c22f275402fe5a186902edd6d5 /drivers | |
parent | 9804c9eaeacfe78651052c5ddff31099f60ef78c (diff) |
[PARISC] Convert to new irq_chip functions
Convert all the parisc driver interrupt handlers (dino, eisa, gsc,
iosapic and superio) as well as the cpu interrupts. Prepare
show_interrupts for GENERIC_HARDIRQS_NO_DEPRECATED and finally selects
that Kconfig option
[jejb: compile and testing fixes]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/parisc/dino.c | 22 | ||||
-rw-r--r-- | drivers/parisc/eisa.c | 12 | ||||
-rw-r--r-- | drivers/parisc/gsc.c | 22 | ||||
-rw-r--r-- | drivers/parisc/iosapic.c | 40 | ||||
-rw-r--r-- | drivers/parisc/superio.c | 12 |
5 files changed, 56 insertions, 52 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 9383063d2b16..bcd5d54b7d4d 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -296,25 +296,25 @@ static struct pci_port_ops dino_port_ops = { | |||
296 | .outl = dino_out32 | 296 | .outl = dino_out32 |
297 | }; | 297 | }; |
298 | 298 | ||
299 | static void dino_mask_irq(unsigned int irq) | 299 | static void dino_mask_irq(struct irq_data *d) |
300 | { | 300 | { |
301 | struct dino_device *dino_dev = get_irq_chip_data(irq); | 301 | struct dino_device *dino_dev = irq_data_get_irq_chip_data(d); |
302 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); | 302 | int local_irq = gsc_find_local_irq(d->irq, dino_dev->global_irq, DINO_LOCAL_IRQS); |
303 | 303 | ||
304 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq); | 304 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, d->irq); |
305 | 305 | ||
306 | /* Clear the matching bit in the IMR register */ | 306 | /* Clear the matching bit in the IMR register */ |
307 | dino_dev->imr &= ~(DINO_MASK_IRQ(local_irq)); | 307 | dino_dev->imr &= ~(DINO_MASK_IRQ(local_irq)); |
308 | __raw_writel(dino_dev->imr, dino_dev->hba.base_addr+DINO_IMR); | 308 | __raw_writel(dino_dev->imr, dino_dev->hba.base_addr+DINO_IMR); |
309 | } | 309 | } |
310 | 310 | ||
311 | static void dino_unmask_irq(unsigned int irq) | 311 | static void dino_unmask_irq(struct irq_data *d) |
312 | { | 312 | { |
313 | struct dino_device *dino_dev = get_irq_chip_data(irq); | 313 | struct dino_device *dino_dev = irq_data_get_irq_chip_data(d); |
314 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); | 314 | int local_irq = gsc_find_local_irq(d->irq, dino_dev->global_irq, DINO_LOCAL_IRQS); |
315 | u32 tmp; | 315 | u32 tmp; |
316 | 316 | ||
317 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq); | 317 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, d->irq); |
318 | 318 | ||
319 | /* | 319 | /* |
320 | ** clear pending IRQ bits | 320 | ** clear pending IRQ bits |
@@ -346,9 +346,9 @@ static void dino_unmask_irq(unsigned int irq) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | static struct irq_chip dino_interrupt_type = { | 348 | static struct irq_chip dino_interrupt_type = { |
349 | .name = "GSC-PCI", | 349 | .name = "GSC-PCI", |
350 | .unmask = dino_unmask_irq, | 350 | .irq_unmask = dino_unmask_irq, |
351 | .mask = dino_mask_irq, | 351 | .irq_mask = dino_mask_irq, |
352 | }; | 352 | }; |
353 | 353 | ||
354 | 354 | ||
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c index e860038b0b84..deeec32a5803 100644 --- a/drivers/parisc/eisa.c +++ b/drivers/parisc/eisa.c | |||
@@ -144,8 +144,9 @@ static unsigned int eisa_irq_level __read_mostly; /* default to edge triggered * | |||
144 | 144 | ||
145 | 145 | ||
146 | /* called by free irq */ | 146 | /* called by free irq */ |
147 | static void eisa_mask_irq(unsigned int irq) | 147 | static void eisa_mask_irq(struct irq_data *d) |
148 | { | 148 | { |
149 | unsigned int irq = d->irq; | ||
149 | unsigned long flags; | 150 | unsigned long flags; |
150 | 151 | ||
151 | EISA_DBG("disable irq %d\n", irq); | 152 | EISA_DBG("disable irq %d\n", irq); |
@@ -164,8 +165,9 @@ static void eisa_mask_irq(unsigned int irq) | |||
164 | } | 165 | } |
165 | 166 | ||
166 | /* called by request irq */ | 167 | /* called by request irq */ |
167 | static void eisa_unmask_irq(unsigned int irq) | 168 | static void eisa_unmask_irq(struct irq_data *d) |
168 | { | 169 | { |
170 | unsigned int irq = d->irq; | ||
169 | unsigned long flags; | 171 | unsigned long flags; |
170 | EISA_DBG("enable irq %d\n", irq); | 172 | EISA_DBG("enable irq %d\n", irq); |
171 | 173 | ||
@@ -183,9 +185,9 @@ static void eisa_unmask_irq(unsigned int irq) | |||
183 | } | 185 | } |
184 | 186 | ||
185 | static struct irq_chip eisa_interrupt_type = { | 187 | static struct irq_chip eisa_interrupt_type = { |
186 | .name = "EISA", | 188 | .name = "EISA", |
187 | .unmask = eisa_unmask_irq, | 189 | .irq_unmask = eisa_unmask_irq, |
188 | .mask = eisa_mask_irq, | 190 | .irq_mask = eisa_mask_irq, |
189 | }; | 191 | }; |
190 | 192 | ||
191 | static irqreturn_t eisa_irq(int wax_irq, void *intr_dev) | 193 | static irqreturn_t eisa_irq(int wax_irq, void *intr_dev) |
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c index 772b1939ac21..ef31080cf591 100644 --- a/drivers/parisc/gsc.c +++ b/drivers/parisc/gsc.c | |||
@@ -105,13 +105,13 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit) | |||
105 | return NO_IRQ; | 105 | return NO_IRQ; |
106 | } | 106 | } |
107 | 107 | ||
108 | static void gsc_asic_mask_irq(unsigned int irq) | 108 | static void gsc_asic_mask_irq(struct irq_data *d) |
109 | { | 109 | { |
110 | struct gsc_asic *irq_dev = get_irq_chip_data(irq); | 110 | struct gsc_asic *irq_dev = irq_data_get_irq_chip_data(d); |
111 | int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); | 111 | int local_irq = gsc_find_local_irq(d->irq, irq_dev->global_irq, 32); |
112 | u32 imr; | 112 | u32 imr; |
113 | 113 | ||
114 | DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq, | 114 | DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, d->irq, |
115 | irq_dev->name, imr); | 115 | irq_dev->name, imr); |
116 | 116 | ||
117 | /* Disable the IRQ line by clearing the bit in the IMR */ | 117 | /* Disable the IRQ line by clearing the bit in the IMR */ |
@@ -120,13 +120,13 @@ static void gsc_asic_mask_irq(unsigned int irq) | |||
120 | gsc_writel(imr, irq_dev->hpa + OFFSET_IMR); | 120 | gsc_writel(imr, irq_dev->hpa + OFFSET_IMR); |
121 | } | 121 | } |
122 | 122 | ||
123 | static void gsc_asic_unmask_irq(unsigned int irq) | 123 | static void gsc_asic_unmask_irq(struct irq_data *d) |
124 | { | 124 | { |
125 | struct gsc_asic *irq_dev = get_irq_chip_data(irq); | 125 | struct gsc_asic *irq_dev = irq_data_get_irq_chip_data(d); |
126 | int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); | 126 | int local_irq = gsc_find_local_irq(d->irq, irq_dev->global_irq, 32); |
127 | u32 imr; | 127 | u32 imr; |
128 | 128 | ||
129 | DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq, | 129 | DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, d->irq, |
130 | irq_dev->name, imr); | 130 | irq_dev->name, imr); |
131 | 131 | ||
132 | /* Enable the IRQ line by setting the bit in the IMR */ | 132 | /* Enable the IRQ line by setting the bit in the IMR */ |
@@ -140,9 +140,9 @@ static void gsc_asic_unmask_irq(unsigned int irq) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | static struct irq_chip gsc_asic_interrupt_type = { | 142 | static struct irq_chip gsc_asic_interrupt_type = { |
143 | .name = "GSC-ASIC", | 143 | .name = "GSC-ASIC", |
144 | .unmask = gsc_asic_unmask_irq, | 144 | .irq_unmask = gsc_asic_unmask_irq, |
145 | .mask = gsc_asic_mask_irq, | 145 | .irq_mask = gsc_asic_mask_irq, |
146 | }; | 146 | }; |
147 | 147 | ||
148 | int gsc_assign_irq(struct irq_chip *type, void *data) | 148 | int gsc_assign_irq(struct irq_chip *type, void *data) |
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 0327894bf235..95930d016235 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c | |||
@@ -615,10 +615,10 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1) | |||
615 | } | 615 | } |
616 | 616 | ||
617 | 617 | ||
618 | static void iosapic_mask_irq(unsigned int irq) | 618 | static void iosapic_mask_irq(struct irq_data *d) |
619 | { | 619 | { |
620 | unsigned long flags; | 620 | unsigned long flags; |
621 | struct vector_info *vi = get_irq_chip_data(irq); | 621 | struct vector_info *vi = irq_data_get_irq_chip_data(d); |
622 | u32 d0, d1; | 622 | u32 d0, d1; |
623 | 623 | ||
624 | spin_lock_irqsave(&iosapic_lock, flags); | 624 | spin_lock_irqsave(&iosapic_lock, flags); |
@@ -628,9 +628,9 @@ static void iosapic_mask_irq(unsigned int irq) | |||
628 | spin_unlock_irqrestore(&iosapic_lock, flags); | 628 | spin_unlock_irqrestore(&iosapic_lock, flags); |
629 | } | 629 | } |
630 | 630 | ||
631 | static void iosapic_unmask_irq(unsigned int irq) | 631 | static void iosapic_unmask_irq(struct irq_data *d) |
632 | { | 632 | { |
633 | struct vector_info *vi = get_irq_chip_data(irq); | 633 | struct vector_info *vi = irq_data_get_irq_chip_data(d); |
634 | u32 d0, d1; | 634 | u32 d0, d1; |
635 | 635 | ||
636 | /* data is initialized by fixup_irq */ | 636 | /* data is initialized by fixup_irq */ |
@@ -666,34 +666,34 @@ printk("\n"); | |||
666 | * enables their IRQ. It can lead to "interesting" race conditions | 666 | * enables their IRQ. It can lead to "interesting" race conditions |
667 | * in the driver initialization sequence. | 667 | * in the driver initialization sequence. |
668 | */ | 668 | */ |
669 | DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", irq, | 669 | DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", d->irq, |
670 | vi->eoi_addr, vi->eoi_data); | 670 | vi->eoi_addr, vi->eoi_data); |
671 | iosapic_eoi(vi->eoi_addr, vi->eoi_data); | 671 | iosapic_eoi(vi->eoi_addr, vi->eoi_data); |
672 | } | 672 | } |
673 | 673 | ||
674 | static void iosapic_eoi_irq(unsigned int irq) | 674 | static void iosapic_eoi_irq(struct irq_data *d) |
675 | { | 675 | { |
676 | struct vector_info *vi = get_irq_chip_data(irq); | 676 | struct vector_info *vi = irq_data_get_irq_chip_data(d); |
677 | 677 | ||
678 | iosapic_eoi(vi->eoi_addr, vi->eoi_data); | 678 | iosapic_eoi(vi->eoi_addr, vi->eoi_data); |
679 | cpu_eoi_irq(irq); | 679 | cpu_eoi_irq(d); |
680 | } | 680 | } |
681 | 681 | ||
682 | #ifdef CONFIG_SMP | 682 | #ifdef CONFIG_SMP |
683 | static int iosapic_set_affinity_irq(unsigned int irq, | 683 | static int iosapic_set_affinity_irq(struct irq_data *d, |
684 | const struct cpumask *dest) | 684 | const struct cpumask *dest, bool force) |
685 | { | 685 | { |
686 | struct vector_info *vi = get_irq_chip_data(irq); | 686 | struct vector_info *vi = irq_data_get_irq_chip_data(d); |
687 | u32 d0, d1, dummy_d0; | 687 | u32 d0, d1, dummy_d0; |
688 | unsigned long flags; | 688 | unsigned long flags; |
689 | int dest_cpu; | 689 | int dest_cpu; |
690 | 690 | ||
691 | dest_cpu = cpu_check_affinity(irq, dest); | 691 | dest_cpu = cpu_check_affinity(d, dest); |
692 | if (dest_cpu < 0) | 692 | if (dest_cpu < 0) |
693 | return -1; | 693 | return -1; |
694 | 694 | ||
695 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(dest_cpu)); | 695 | cpumask_copy(d->affinity, cpumask_of(dest_cpu)); |
696 | vi->txn_addr = txn_affinity_addr(irq, dest_cpu); | 696 | vi->txn_addr = txn_affinity_addr(d->irq, dest_cpu); |
697 | 697 | ||
698 | spin_lock_irqsave(&iosapic_lock, flags); | 698 | spin_lock_irqsave(&iosapic_lock, flags); |
699 | /* d1 contains the destination CPU, so only want to set that | 699 | /* d1 contains the destination CPU, so only want to set that |
@@ -708,13 +708,13 @@ static int iosapic_set_affinity_irq(unsigned int irq, | |||
708 | #endif | 708 | #endif |
709 | 709 | ||
710 | static struct irq_chip iosapic_interrupt_type = { | 710 | static struct irq_chip iosapic_interrupt_type = { |
711 | .name = "IO-SAPIC-level", | 711 | .name = "IO-SAPIC-level", |
712 | .unmask = iosapic_unmask_irq, | 712 | .irq_unmask = iosapic_unmask_irq, |
713 | .mask = iosapic_mask_irq, | 713 | .irq_mask = iosapic_mask_irq, |
714 | .ack = cpu_ack_irq, | 714 | .irq_ack = cpu_ack_irq, |
715 | .eoi = iosapic_eoi_irq, | 715 | .irq_eoi = iosapic_eoi_irq, |
716 | #ifdef CONFIG_SMP | 716 | #ifdef CONFIG_SMP |
717 | .set_affinity = iosapic_set_affinity_irq, | 717 | .irq_set_affinity = iosapic_set_affinity_irq, |
718 | #endif | 718 | #endif |
719 | }; | 719 | }; |
720 | 720 | ||
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c index 28241532c0fd..a4d8ff66a639 100644 --- a/drivers/parisc/superio.c +++ b/drivers/parisc/superio.c | |||
@@ -286,8 +286,9 @@ superio_init(struct pci_dev *pcidev) | |||
286 | } | 286 | } |
287 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO, superio_init); | 287 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO, superio_init); |
288 | 288 | ||
289 | static void superio_mask_irq(unsigned int irq) | 289 | static void superio_mask_irq(struct irq_data *d) |
290 | { | 290 | { |
291 | unsigned int irq = d->irq; | ||
291 | u8 r8; | 292 | u8 r8; |
292 | 293 | ||
293 | if ((irq < 1) || (irq == 2) || (irq > 7)) { | 294 | if ((irq < 1) || (irq == 2) || (irq > 7)) { |
@@ -303,8 +304,9 @@ static void superio_mask_irq(unsigned int irq) | |||
303 | outb (r8,IC_PIC1+1); | 304 | outb (r8,IC_PIC1+1); |
304 | } | 305 | } |
305 | 306 | ||
306 | static void superio_unmask_irq(unsigned int irq) | 307 | static void superio_unmask_irq(struct irq_data *d) |
307 | { | 308 | { |
309 | unsigned int irq = d->irq; | ||
308 | u8 r8; | 310 | u8 r8; |
309 | 311 | ||
310 | if ((irq < 1) || (irq == 2) || (irq > 7)) { | 312 | if ((irq < 1) || (irq == 2) || (irq > 7)) { |
@@ -320,9 +322,9 @@ static void superio_unmask_irq(unsigned int irq) | |||
320 | } | 322 | } |
321 | 323 | ||
322 | static struct irq_chip superio_interrupt_type = { | 324 | static struct irq_chip superio_interrupt_type = { |
323 | .name = SUPERIO, | 325 | .name = SUPERIO, |
324 | .unmask = superio_unmask_irq, | 326 | .irq_unmask = superio_unmask_irq, |
325 | .mask = superio_mask_irq, | 327 | .irq_mask = superio_mask_irq, |
326 | }; | 328 | }; |
327 | 329 | ||
328 | #ifdef DEBUG_SUPERIO_INIT | 330 | #ifdef DEBUG_SUPERIO_INIT |