brcm63xx: update development kernel to linux 3.14
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.14 / 326-MIPS-BCM63XX-use-irq_desc-as-argument-for-un-mask.patch
1 From b665117faa0dfde70689502fc420d72bbf8e6bd4 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Tue, 30 Apr 2013 11:26:53 +0200
4 Subject: [PATCH 37/53] MIPS: BCM63XX: use irq_desc as argument for (un)mask
5
6 In preparation for applying affinity, use the irq descriptor as the
7 argument for (un)mask.
8
9 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
10 ---
11 arch/mips/bcm63xx/irq.c | 18 ++++++++++--------
12 1 file changed, 10 insertions(+), 8 deletions(-)
13
14 --- a/arch/mips/bcm63xx/irq.c
15 +++ b/arch/mips/bcm63xx/irq.c
16 @@ -31,8 +31,8 @@ static int is_ext_irq_cascaded;
17 static unsigned int ext_irq_count;
18 static unsigned int ext_irq_start, ext_irq_end;
19 static unsigned int ext_irq_cfg_reg1, ext_irq_cfg_reg2;
20 -static void (*internal_irq_mask)(unsigned int irq);
21 -static void (*internal_irq_unmask)(unsigned int irq);
22 +static void (*internal_irq_mask)(struct irq_data *d);
23 +static void (*internal_irq_unmask)(struct irq_data *d);
24
25
26 static inline u32 get_ext_irq_perf_reg(int irq)
27 @@ -96,9 +96,10 @@ void __dispatch_internal_##width(int pin
28 } \
29 } \
30 \
31 -static void __internal_irq_mask_##width(unsigned int irq) \
32 +static void __internal_irq_mask_##width(struct irq_data *d) \
33 { \
34 u32 val; \
35 + unsigned irq = d->irq - IRQ_INTERNAL_BASE; \
36 unsigned reg = (irq / 32) ^ (width/32 - 1); \
37 unsigned bit = irq & 0x1f; \
38 unsigned long flags; \
39 @@ -116,9 +117,10 @@ static void __internal_irq_mask_##width(
40 spin_unlock_irqrestore(&ipic_lock, flags); \
41 } \
42 \
43 -static void __internal_irq_unmask_##width(unsigned int irq) \
44 +static void __internal_irq_unmask_##width(struct irq_data *d) \
45 { \
46 u32 val; \
47 + unsigned irq = d->irq - IRQ_INTERNAL_BASE; \
48 unsigned reg = (irq / 32) ^ (width/32 - 1); \
49 unsigned bit = irq & 0x1f; \
50 unsigned long flags; \
51 @@ -182,12 +184,12 @@ asmlinkage void plat_irq_dispatch(void)
52 */
53 static void bcm63xx_internal_irq_mask(struct irq_data *d)
54 {
55 - internal_irq_mask(d->irq - IRQ_INTERNAL_BASE);
56 + internal_irq_mask(d);
57 }
58
59 static void bcm63xx_internal_irq_unmask(struct irq_data *d)
60 {
61 - internal_irq_unmask(d->irq - IRQ_INTERNAL_BASE);
62 + internal_irq_unmask(d);
63 }
64
65 /*
66 @@ -213,7 +215,7 @@ static void bcm63xx_external_irq_mask(st
67 spin_unlock_irqrestore(&epic_lock, flags);
68
69 if (is_ext_irq_cascaded)
70 - internal_irq_mask(irq + ext_irq_start);
71 + internal_irq_mask(irq_get_irq_data(irq + ext_irq_start));
72 }
73
74 static void bcm63xx_external_irq_unmask(struct irq_data *d)
75 @@ -235,7 +237,7 @@ static void bcm63xx_external_irq_unmask(
76 spin_unlock_irqrestore(&epic_lock, flags);
77
78 if (is_ext_irq_cascaded)
79 - internal_irq_unmask(irq + ext_irq_start);
80 + internal_irq_unmask(irq_get_irq_data(irq + ext_irq_start));
81 }
82
83 static void bcm63xx_external_irq_clear(struct irq_data *d)