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

MIPS: BCM63xx: Use irq_desc as argument for (un)mask

In preparation for applying affinity, use the irq descriptor as the
argument for (un)mask.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: John Crispin <blogic@openwrt.org>
Cc: Maxime Bizon <mbizon@freebox.fr>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Gregory Fong <gregory.0xf0@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/7317/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Jonas Gorski and committed by
Ralf Baechle
553e25b3 56d53eae

+10 -8
+10 -8
arch/mips/bcm63xx/irq.c
··· 31 31 static unsigned int ext_irq_count; 32 32 static unsigned int ext_irq_start, ext_irq_end; 33 33 static unsigned int ext_irq_cfg_reg1, ext_irq_cfg_reg2; 34 - static void (*internal_irq_mask)(unsigned int irq); 35 - static void (*internal_irq_unmask)(unsigned int irq); 34 + static void (*internal_irq_mask)(struct irq_data *d); 35 + static void (*internal_irq_unmask)(struct irq_data *d); 36 36 37 37 38 38 static inline u32 get_ext_irq_perf_reg(int irq) ··· 96 96 } \ 97 97 } \ 98 98 \ 99 - static void __internal_irq_mask_##width(unsigned int irq) \ 99 + static void __internal_irq_mask_##width(struct irq_data *d) \ 100 100 { \ 101 101 u32 val; \ 102 + unsigned irq = d->irq - IRQ_INTERNAL_BASE; \ 102 103 unsigned reg = (irq / 32) ^ (width/32 - 1); \ 103 104 unsigned bit = irq & 0x1f; \ 104 105 unsigned long flags; \ ··· 117 116 spin_unlock_irqrestore(&ipic_lock, flags); \ 118 117 } \ 119 118 \ 120 - static void __internal_irq_unmask_##width(unsigned int irq) \ 119 + static void __internal_irq_unmask_##width(struct irq_data *d) \ 121 120 { \ 122 121 u32 val; \ 122 + unsigned irq = d->irq - IRQ_INTERNAL_BASE; \ 123 123 unsigned reg = (irq / 32) ^ (width/32 - 1); \ 124 124 unsigned bit = irq & 0x1f; \ 125 125 unsigned long flags; \ ··· 184 182 */ 185 183 static void bcm63xx_internal_irq_mask(struct irq_data *d) 186 184 { 187 - internal_irq_mask(d->irq - IRQ_INTERNAL_BASE); 185 + internal_irq_mask(d); 188 186 } 189 187 190 188 static void bcm63xx_internal_irq_unmask(struct irq_data *d) 191 189 { 192 - internal_irq_unmask(d->irq - IRQ_INTERNAL_BASE); 190 + internal_irq_unmask(d); 193 191 } 194 192 195 193 /* ··· 215 213 spin_unlock_irqrestore(&epic_lock, flags); 216 214 217 215 if (is_ext_irq_cascaded) 218 - internal_irq_mask(irq + ext_irq_start); 216 + internal_irq_mask(irq_get_irq_data(irq + ext_irq_start)); 219 217 } 220 218 221 219 static void bcm63xx_external_irq_unmask(struct irq_data *d) ··· 237 235 spin_unlock_irqrestore(&epic_lock, flags); 238 236 239 237 if (is_ext_irq_cascaded) 240 - internal_irq_unmask(irq + ext_irq_start); 238 + internal_irq_unmask(irq_get_irq_data(irq + ext_irq_start)); 241 239 } 242 240 243 241 static void bcm63xx_external_irq_clear(struct irq_data *d)