Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'queue/irq/arm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next/cleanup

Merge "ARM: Interrupt cleanups and API change preparation" from Thomas
Gleixner:

The following patch series contains the following changes:

- Consolidation of chained interrupt handler setup/removal

- Switch to functions which avoid a redundant interrupt
descriptor lookup

- Preparation of interrupt flow handlers for the 'irq' argument
removal

* 'queue/irq/arm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
ARM/orion/gpio: Prepare gpio_irq_handler for irq argument removal
ARM/pxa: Prepare balloon3_irq_handler for irq argument removal
ARM/pxa: Prepare *_irq_handler for irq argument removal
ARM/dove: Prepare pmu_irq_handler for irq argument removal
ARM/sa1111: Prepare sa1111_irq_handler for irq argument removal
ARM/locomo: Prepare locomo_handler for irq argument removal
ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
ARM/LPC32xx: Use irq_set_handler_locked()
ARM/irq: Use access helper irq_data_get_affinity_mask()
ARM/locomo: Consolidate chained IRQ handler install/remove
ARM/orion: Consolidate chained IRQ handler install/remove

Signed-off-by: Olof Johansson <olof@lixom.net>

+38 -29
+5 -4
arch/arm/common/locomo.c
··· 138 138 }, 139 139 }; 140 140 141 - static void locomo_handler(unsigned int irq, struct irq_desc *desc) 141 + static void locomo_handler(unsigned int __irq, struct irq_desc *desc) 142 142 { 143 - struct locomo *lchip = irq_get_chip_data(irq); 143 + struct locomo *lchip = irq_desc_get_chip_data(desc); 144 144 int req, i; 145 145 146 146 /* Acknowledge the parent IRQ */ ··· 150 150 req = locomo_readl(lchip->base + LOCOMO_ICR) & 0x0f00; 151 151 152 152 if (req) { 153 + unsigned int irq; 154 + 153 155 /* generate the next interrupt(s) */ 154 156 irq = lchip->irq_base; 155 157 for (i = 0; i <= 3; i++, irq++) { ··· 477 475 device_for_each_child(lchip->dev, NULL, locomo_remove_child); 478 476 479 477 if (lchip->irq != NO_IRQ) { 480 - irq_set_chained_handler(lchip->irq, NULL); 481 - irq_set_handler_data(lchip->irq, NULL); 478 + irq_set_chained_handler_and_data(lchip->irq, NULL, NULL); 482 479 } 483 480 484 481 iounmap(lchip->base);
+3 -2
arch/arm/common/sa1111.c
··· 197 197 * will call us again if there are more interrupts to process. 198 198 */ 199 199 static void 200 - sa1111_irq_handler(unsigned int irq, struct irq_desc *desc) 200 + sa1111_irq_handler(unsigned int __irq, struct irq_desc *desc) 201 201 { 202 + unsigned int irq = irq_desc_get_irq(desc); 202 203 unsigned int stat0, stat1, i; 203 - struct sa1111 *sachip = irq_get_handler_data(irq); 204 + struct sa1111 *sachip = irq_desc_get_handler_data(desc); 204 205 void __iomem *mapbase = sachip->base + SA1111_INTC; 205 206 206 207 stat0 = sa1111_readl(mapbase + SA1111_INTSTATCLR0);
+2 -2
arch/arm/kernel/irq.c
··· 140 140 static bool migrate_one_irq(struct irq_desc *desc) 141 141 { 142 142 struct irq_data *d = irq_desc_get_irq_data(desc); 143 - const struct cpumask *affinity = d->affinity; 143 + const struct cpumask *affinity = irq_data_get_affinity_mask(d); 144 144 struct irq_chip *c; 145 145 bool ret = false; 146 146 ··· 160 160 if (!c->irq_set_affinity) 161 161 pr_debug("IRQ%u: unable to set affinity\n", d->irq); 162 162 else if (c->irq_set_affinity(d, affinity, false) == IRQ_SET_MASK_OK && ret) 163 - cpumask_copy(d->affinity, affinity); 163 + cpumask_copy(irq_data_get_affinity_mask(d), affinity); 164 164 165 165 return ret; 166 166 }
+2 -1
arch/arm/mach-dove/irq.c
··· 69 69 .irq_ack = pmu_irq_ack, 70 70 }; 71 71 72 - static void pmu_irq_handler(unsigned int irq, struct irq_desc *desc) 72 + static void pmu_irq_handler(unsigned int __irq, struct irq_desc *desc) 73 73 { 74 + unsigned int irq = irq_desc_get_irq(desc); 74 75 unsigned long cause = readl(PMU_INTERRUPT_CAUSE); 75 76 76 77 cause &= readl(PMU_INTERRUPT_MASK);
+4 -4
arch/arm/mach-lpc32xx/irq.c
··· 283 283 case IRQ_TYPE_EDGE_RISING: 284 284 /* Rising edge sensitive */ 285 285 __lpc32xx_set_irq_type(d->hwirq, 1, 1); 286 - __irq_set_handler_locked(d->irq, handle_edge_irq); 286 + irq_set_handler_locked(d, handle_edge_irq); 287 287 break; 288 288 289 289 case IRQ_TYPE_EDGE_FALLING: 290 290 /* Falling edge sensitive */ 291 291 __lpc32xx_set_irq_type(d->hwirq, 0, 1); 292 - __irq_set_handler_locked(d->irq, handle_edge_irq); 292 + irq_set_handler_locked(d, handle_edge_irq); 293 293 break; 294 294 295 295 case IRQ_TYPE_LEVEL_LOW: 296 296 /* Low level sensitive */ 297 297 __lpc32xx_set_irq_type(d->hwirq, 0, 0); 298 - __irq_set_handler_locked(d->irq, handle_level_irq); 298 + irq_set_handler_locked(d, handle_level_irq); 299 299 break; 300 300 301 301 case IRQ_TYPE_LEVEL_HIGH: 302 302 /* High level sensitive */ 303 303 __lpc32xx_set_irq_type(d->hwirq, 1, 0); 304 - __irq_set_handler_locked(d->irq, handle_level_irq); 304 + irq_set_handler_locked(d, handle_level_irq); 305 305 break; 306 306 307 307 /* Other modes are not supported */
+7 -7
arch/arm/mach-pxa/balloon3.c
··· 496 496 .irq_unmask = balloon3_unmask_irq, 497 497 }; 498 498 499 - static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc) 499 + static void balloon3_irq_handler(unsigned int __irq, struct irq_desc *desc) 500 500 { 501 501 unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & 502 502 balloon3_irq_enabled; 503 503 do { 504 - /* clear useless edge notification */ 505 - if (desc->irq_data.chip->irq_ack) { 506 - struct irq_data *d; 504 + struct irq_data *d = irq_desc_get_irq_data(desc); 505 + struct irq_chip *chip = irq_data_get_chip(d); 506 + unsigned int irq; 507 507 508 - d = irq_get_irq_data(BALLOON3_AUX_NIRQ); 509 - desc->irq_data.chip->irq_ack(d); 510 - } 508 + /* clear useless edge notification */ 509 + if (chip->irq_ack) 510 + chip->irq_ack(d); 511 511 512 512 while (pending) { 513 513 irq = BALLOON3_IRQ(0) + __ffs(pending);
+2 -1
arch/arm/mach-pxa/cm-x2xx-pci.c
··· 29 29 void __iomem *it8152_base_address; 30 30 static int cmx2xx_it8152_irq_gpio; 31 31 32 - static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) 32 + static void cmx2xx_it8152_irq_demux(unsigned int __irq, struct irq_desc *desc) 33 33 { 34 + unsigned int irq = irq_desc_get_irq(desc); 34 35 /* clear our parent irq */ 35 36 desc->irq_data.chip->irq_ack(&desc->irq_data); 36 37
+2 -1
arch/arm/mach-pxa/lpd270.c
··· 120 120 .irq_unmask = lpd270_unmask_irq, 121 121 }; 122 122 123 - static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc) 123 + static void lpd270_irq_handler(unsigned int __irq, struct irq_desc *desc) 124 124 { 125 + unsigned int irq; 125 126 unsigned long pending; 126 127 127 128 pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled;
+2 -1
arch/arm/mach-pxa/pcm990-baseboard.c
··· 284 284 .irq_unmask = pcm990_unmask_irq, 285 285 }; 286 286 287 - static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc) 287 + static void pcm990_irq_handler(unsigned int __irq, struct irq_desc *desc) 288 288 { 289 + unsigned int irq; 289 290 unsigned long pending; 290 291 291 292 pending = ~pcm990_cpld_readb(PCM990_CTRL_INTSETCLR);
+2 -1
arch/arm/mach-pxa/viper.c
··· 276 276 viper_irq_enabled_mask; 277 277 } 278 278 279 - static void viper_irq_handler(unsigned int irq, struct irq_desc *desc) 279 + static void viper_irq_handler(unsigned int __irq, struct irq_desc *desc) 280 280 { 281 + unsigned int irq; 281 282 unsigned long pending; 282 283 283 284 pending = viper_irq_pending();
+2 -1
arch/arm/mach-pxa/zeus.c
··· 105 105 return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask; 106 106 } 107 107 108 - static void zeus_irq_handler(unsigned int irq, struct irq_desc *desc) 108 + static void zeus_irq_handler(unsigned int __irq, struct irq_desc *desc) 109 109 { 110 + unsigned int irq; 110 111 unsigned long pending; 111 112 112 113 pending = zeus_irq_pending();
+5 -4
arch/arm/plat-orion/gpio.c
··· 407 407 return 0; 408 408 } 409 409 410 - static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) 410 + static void gpio_irq_handler(unsigned __irq, struct irq_desc *desc) 411 411 { 412 - struct orion_gpio_chip *ochip = irq_get_handler_data(irq); 412 + struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc); 413 413 u32 cause, type; 414 414 int i; 415 415 ··· 582 582 583 583 for (i = 0; i < 4; i++) { 584 584 if (irqs[i]) { 585 - irq_set_handler_data(irqs[i], ochip); 586 - irq_set_chained_handler(irqs[i], gpio_irq_handler); 585 + irq_set_chained_handler_and_data(irqs[i], 586 + gpio_irq_handler, 587 + ochip); 587 588 } 588 589 } 589 590