diff options
author | Jonas Gorski <jogo@openwrt.org> | 2014-07-12 06:49:41 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-07-30 09:29:59 -0400 |
commit | 553e25b3da2f1c8e30cc20499ae3593815df97e9 (patch) | |
tree | 13fd290b0986050b2916313d5aa46899e3532ec3 /arch/mips/bcm63xx | |
parent | 56d53eaec1ad402cb1055e816adad102d2f5b6bf (diff) |
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>
Diffstat (limited to 'arch/mips/bcm63xx')
-rw-r--r-- | arch/mips/bcm63xx/irq.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/mips/bcm63xx/irq.c b/arch/mips/bcm63xx/irq.c index 615b25bb34f5..a53305fbedb8 100644 --- a/arch/mips/bcm63xx/irq.c +++ b/arch/mips/bcm63xx/irq.c | |||
@@ -31,8 +31,8 @@ static int is_ext_irq_cascaded; | |||
31 | static unsigned int ext_irq_count; | 31 | static unsigned int ext_irq_count; |
32 | static unsigned int ext_irq_start, ext_irq_end; | 32 | static unsigned int ext_irq_start, ext_irq_end; |
33 | static unsigned int ext_irq_cfg_reg1, ext_irq_cfg_reg2; | 33 | static unsigned int ext_irq_cfg_reg1, ext_irq_cfg_reg2; |
34 | static void (*internal_irq_mask)(unsigned int irq); | 34 | static void (*internal_irq_mask)(struct irq_data *d); |
35 | static void (*internal_irq_unmask)(unsigned int irq); | 35 | static void (*internal_irq_unmask)(struct irq_data *d); |
36 | 36 | ||
37 | 37 | ||
38 | static inline u32 get_ext_irq_perf_reg(int irq) | 38 | static inline u32 get_ext_irq_perf_reg(int irq) |
@@ -96,9 +96,10 @@ void __dispatch_internal_##width(int cpu) \ | |||
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 | u32 val; \ | 101 | u32 val; \ |
102 | unsigned irq = d->irq - IRQ_INTERNAL_BASE; \ | ||
102 | unsigned reg = (irq / 32) ^ (width/32 - 1); \ | 103 | unsigned reg = (irq / 32) ^ (width/32 - 1); \ |
103 | unsigned bit = irq & 0x1f; \ | 104 | unsigned bit = irq & 0x1f; \ |
104 | unsigned long flags; \ | 105 | unsigned long flags; \ |
@@ -116,9 +117,10 @@ static void __internal_irq_mask_##width(unsigned int irq) \ | |||
116 | spin_unlock_irqrestore(&ipic_lock, flags); \ | 117 | spin_unlock_irqrestore(&ipic_lock, flags); \ |
117 | } \ | 118 | } \ |
118 | \ | 119 | \ |
119 | static void __internal_irq_unmask_##width(unsigned int irq) \ | 120 | static void __internal_irq_unmask_##width(struct irq_data *d) \ |
120 | { \ | 121 | { \ |
121 | u32 val; \ | 122 | u32 val; \ |
123 | unsigned irq = d->irq - IRQ_INTERNAL_BASE; \ | ||
122 | unsigned reg = (irq / 32) ^ (width/32 - 1); \ | 124 | unsigned reg = (irq / 32) ^ (width/32 - 1); \ |
123 | unsigned bit = irq & 0x1f; \ | 125 | unsigned bit = irq & 0x1f; \ |
124 | unsigned long flags; \ | 126 | unsigned long flags; \ |
@@ -182,12 +184,12 @@ asmlinkage void plat_irq_dispatch(void) | |||
182 | */ | 184 | */ |
183 | static void bcm63xx_internal_irq_mask(struct irq_data *d) | 185 | static void bcm63xx_internal_irq_mask(struct irq_data *d) |
184 | { | 186 | { |
185 | internal_irq_mask(d->irq - IRQ_INTERNAL_BASE); | 187 | internal_irq_mask(d); |
186 | } | 188 | } |
187 | 189 | ||
188 | static void bcm63xx_internal_irq_unmask(struct irq_data *d) | 190 | static void bcm63xx_internal_irq_unmask(struct irq_data *d) |
189 | { | 191 | { |
190 | internal_irq_unmask(d->irq - IRQ_INTERNAL_BASE); | 192 | internal_irq_unmask(d); |
191 | } | 193 | } |
192 | 194 | ||
193 | /* | 195 | /* |
@@ -213,7 +215,7 @@ static void bcm63xx_external_irq_mask(struct irq_data *d) | |||
213 | spin_unlock_irqrestore(&epic_lock, flags); | 215 | spin_unlock_irqrestore(&epic_lock, flags); |
214 | 216 | ||
215 | if (is_ext_irq_cascaded) | 217 | if (is_ext_irq_cascaded) |
216 | internal_irq_mask(irq + ext_irq_start); | 218 | internal_irq_mask(irq_get_irq_data(irq + ext_irq_start)); |
217 | } | 219 | } |
218 | 220 | ||
219 | static void bcm63xx_external_irq_unmask(struct irq_data *d) | 221 | static void bcm63xx_external_irq_unmask(struct irq_data *d) |
@@ -235,7 +237,7 @@ static void bcm63xx_external_irq_unmask(struct irq_data *d) | |||
235 | spin_unlock_irqrestore(&epic_lock, flags); | 237 | spin_unlock_irqrestore(&epic_lock, flags); |
236 | 238 | ||
237 | if (is_ext_irq_cascaded) | 239 | if (is_ext_irq_cascaded) |
238 | internal_irq_unmask(irq + ext_irq_start); | 240 | internal_irq_unmask(irq_get_irq_data(irq + ext_irq_start)); |
239 | } | 241 | } |
240 | 242 | ||
241 | static void bcm63xx_external_irq_clear(struct irq_data *d) | 243 | static void bcm63xx_external_irq_clear(struct irq_data *d) |