diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-23 17:09:14 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-03-25 13:45:19 -0400 |
commit | d6d5d5c4afd4c8bb4c5e3753a2141e9c3a874629 (patch) | |
tree | 8cfa9f30269678ae55822a90bb3d2e655dc85126 /arch/mips/sibyte | |
parent | 4d2796f83600bbba8e7170e847226c377c0305af (diff) |
MIPS: Sibyte: Convert to new irq_chip functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2205/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sibyte')
-rw-r--r-- | arch/mips/sibyte/bcm1480/irq.c | 55 | ||||
-rw-r--r-- | arch/mips/sibyte/sb1250/irq.c | 53 |
2 files changed, 35 insertions, 73 deletions
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c index 044bbe462c2c..89e8188a4665 100644 --- a/arch/mips/sibyte/bcm1480/irq.c +++ b/arch/mips/sibyte/bcm1480/irq.c | |||
@@ -44,31 +44,10 @@ | |||
44 | * for interrupt lines | 44 | * for interrupt lines |
45 | */ | 45 | */ |
46 | 46 | ||
47 | |||
48 | static void end_bcm1480_irq(unsigned int irq); | ||
49 | static void enable_bcm1480_irq(unsigned int irq); | ||
50 | static void disable_bcm1480_irq(unsigned int irq); | ||
51 | static void ack_bcm1480_irq(unsigned int irq); | ||
52 | #ifdef CONFIG_SMP | ||
53 | static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask); | ||
54 | #endif | ||
55 | |||
56 | #ifdef CONFIG_PCI | 47 | #ifdef CONFIG_PCI |
57 | extern unsigned long ht_eoi_space; | 48 | extern unsigned long ht_eoi_space; |
58 | #endif | 49 | #endif |
59 | 50 | ||
60 | static struct irq_chip bcm1480_irq_type = { | ||
61 | .name = "BCM1480-IMR", | ||
62 | .ack = ack_bcm1480_irq, | ||
63 | .mask = disable_bcm1480_irq, | ||
64 | .mask_ack = ack_bcm1480_irq, | ||
65 | .unmask = enable_bcm1480_irq, | ||
66 | .end = end_bcm1480_irq, | ||
67 | #ifdef CONFIG_SMP | ||
68 | .set_affinity = bcm1480_set_affinity | ||
69 | #endif | ||
70 | }; | ||
71 | |||
72 | /* Store the CPU id (not the logical number) */ | 51 | /* Store the CPU id (not the logical number) */ |
73 | int bcm1480_irq_owner[BCM1480_NR_IRQS]; | 52 | int bcm1480_irq_owner[BCM1480_NR_IRQS]; |
74 | 53 | ||
@@ -109,12 +88,13 @@ void bcm1480_unmask_irq(int cpu, int irq) | |||
109 | } | 88 | } |
110 | 89 | ||
111 | #ifdef CONFIG_SMP | 90 | #ifdef CONFIG_SMP |
112 | static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask) | 91 | static int bcm1480_set_affinity(struct irq_data *d, const struct cpumask *mask, |
92 | bool force) | ||
113 | { | 93 | { |
94 | unsigned int irq_dirty, irq = d->irq; | ||
114 | int i = 0, old_cpu, cpu, int_on, k; | 95 | int i = 0, old_cpu, cpu, int_on, k; |
115 | u64 cur_ints; | 96 | u64 cur_ints; |
116 | unsigned long flags; | 97 | unsigned long flags; |
117 | unsigned int irq_dirty; | ||
118 | 98 | ||
119 | i = cpumask_first(mask); | 99 | i = cpumask_first(mask); |
120 | 100 | ||
@@ -156,21 +136,25 @@ static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask) | |||
156 | 136 | ||
157 | /*****************************************************************************/ | 137 | /*****************************************************************************/ |
158 | 138 | ||
159 | static void disable_bcm1480_irq(unsigned int irq) | 139 | static void disable_bcm1480_irq(struct irq_data *d) |
160 | { | 140 | { |
141 | unsigned int irq = d->irq; | ||
142 | |||
161 | bcm1480_mask_irq(bcm1480_irq_owner[irq], irq); | 143 | bcm1480_mask_irq(bcm1480_irq_owner[irq], irq); |
162 | } | 144 | } |
163 | 145 | ||
164 | static void enable_bcm1480_irq(unsigned int irq) | 146 | static void enable_bcm1480_irq(struct irq_data *d) |
165 | { | 147 | { |
148 | unsigned int irq = d->irq; | ||
149 | |||
166 | bcm1480_unmask_irq(bcm1480_irq_owner[irq], irq); | 150 | bcm1480_unmask_irq(bcm1480_irq_owner[irq], irq); |
167 | } | 151 | } |
168 | 152 | ||
169 | 153 | ||
170 | static void ack_bcm1480_irq(unsigned int irq) | 154 | static void ack_bcm1480_irq(struct irq_data *d) |
171 | { | 155 | { |
156 | unsigned int irq_dirty, irq = d->irq; | ||
172 | u64 pending; | 157 | u64 pending; |
173 | unsigned int irq_dirty; | ||
174 | int k; | 158 | int k; |
175 | 159 | ||
176 | /* | 160 | /* |
@@ -217,14 +201,15 @@ static void ack_bcm1480_irq(unsigned int irq) | |||
217 | bcm1480_mask_irq(bcm1480_irq_owner[irq], irq); | 201 | bcm1480_mask_irq(bcm1480_irq_owner[irq], irq); |
218 | } | 202 | } |
219 | 203 | ||
220 | 204 | static struct irq_chip bcm1480_irq_type = { | |
221 | static void end_bcm1480_irq(unsigned int irq) | 205 | .name = "BCM1480-IMR", |
222 | { | 206 | .irq_mask_ack = ack_bcm1480_irq, |
223 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { | 207 | .irq_mask = disable_bcm1480_irq, |
224 | bcm1480_unmask_irq(bcm1480_irq_owner[irq], irq); | 208 | .irq_unmask = enable_bcm1480_irq, |
225 | } | 209 | #ifdef CONFIG_SMP |
226 | } | 210 | .irq_set_affinity = bcm1480_set_affinity |
227 | 211 | #endif | |
212 | }; | ||
228 | 213 | ||
229 | void __init init_bcm1480_irqs(void) | 214 | void __init init_bcm1480_irqs(void) |
230 | { | 215 | { |
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 12ac04a658ee..fd269ea8d8a8 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -43,31 +43,10 @@ | |||
43 | * for interrupt lines | 43 | * for interrupt lines |
44 | */ | 44 | */ |
45 | 45 | ||
46 | |||
47 | static void end_sb1250_irq(unsigned int irq); | ||
48 | static void enable_sb1250_irq(unsigned int irq); | ||
49 | static void disable_sb1250_irq(unsigned int irq); | ||
50 | static void ack_sb1250_irq(unsigned int irq); | ||
51 | #ifdef CONFIG_SMP | ||
52 | static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask); | ||
53 | #endif | ||
54 | |||
55 | #ifdef CONFIG_SIBYTE_HAS_LDT | 46 | #ifdef CONFIG_SIBYTE_HAS_LDT |
56 | extern unsigned long ldt_eoi_space; | 47 | extern unsigned long ldt_eoi_space; |
57 | #endif | 48 | #endif |
58 | 49 | ||
59 | static struct irq_chip sb1250_irq_type = { | ||
60 | .name = "SB1250-IMR", | ||
61 | .ack = ack_sb1250_irq, | ||
62 | .mask = disable_sb1250_irq, | ||
63 | .mask_ack = ack_sb1250_irq, | ||
64 | .unmask = enable_sb1250_irq, | ||
65 | .end = end_sb1250_irq, | ||
66 | #ifdef CONFIG_SMP | ||
67 | .set_affinity = sb1250_set_affinity | ||
68 | #endif | ||
69 | }; | ||
70 | |||
71 | /* Store the CPU id (not the logical number) */ | 50 | /* Store the CPU id (not the logical number) */ |
72 | int sb1250_irq_owner[SB1250_NR_IRQS]; | 51 | int sb1250_irq_owner[SB1250_NR_IRQS]; |
73 | 52 | ||
@@ -102,9 +81,11 @@ void sb1250_unmask_irq(int cpu, int irq) | |||
102 | } | 81 | } |
103 | 82 | ||
104 | #ifdef CONFIG_SMP | 83 | #ifdef CONFIG_SMP |
105 | static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask) | 84 | static int sb1250_set_affinity(struct irq_data *d, const struct cpumask *mask, |
85 | bool force) | ||
106 | { | 86 | { |
107 | int i = 0, old_cpu, cpu, int_on; | 87 | int i = 0, old_cpu, cpu, int_on; |
88 | unsigned int irq = d->irq; | ||
108 | u64 cur_ints; | 89 | u64 cur_ints; |
109 | unsigned long flags; | 90 | unsigned long flags; |
110 | 91 | ||
@@ -142,21 +123,17 @@ static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask) | |||
142 | } | 123 | } |
143 | #endif | 124 | #endif |
144 | 125 | ||
145 | /*****************************************************************************/ | 126 | static void enable_sb1250_irq(struct irq_data *d) |
146 | |||
147 | static void disable_sb1250_irq(unsigned int irq) | ||
148 | { | 127 | { |
149 | sb1250_mask_irq(sb1250_irq_owner[irq], irq); | 128 | unsigned int irq = d->irq; |
150 | } | ||
151 | 129 | ||
152 | static void enable_sb1250_irq(unsigned int irq) | ||
153 | { | ||
154 | sb1250_unmask_irq(sb1250_irq_owner[irq], irq); | 130 | sb1250_unmask_irq(sb1250_irq_owner[irq], irq); |
155 | } | 131 | } |
156 | 132 | ||
157 | 133 | ||
158 | static void ack_sb1250_irq(unsigned int irq) | 134 | static void ack_sb1250_irq(struct irq_data *d) |
159 | { | 135 | { |
136 | unsigned int irq = d->irq; | ||
160 | #ifdef CONFIG_SIBYTE_HAS_LDT | 137 | #ifdef CONFIG_SIBYTE_HAS_LDT |
161 | u64 pending; | 138 | u64 pending; |
162 | 139 | ||
@@ -199,14 +176,14 @@ static void ack_sb1250_irq(unsigned int irq) | |||
199 | sb1250_mask_irq(sb1250_irq_owner[irq], irq); | 176 | sb1250_mask_irq(sb1250_irq_owner[irq], irq); |
200 | } | 177 | } |
201 | 178 | ||
202 | 179 | static struct irq_chip sb1250_irq_type = { | |
203 | static void end_sb1250_irq(unsigned int irq) | 180 | .name = "SB1250-IMR", |
204 | { | 181 | .irq_mask_ack = ack_sb1250_irq, |
205 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { | 182 | .irq_unmask = enable_sb1250_irq, |
206 | sb1250_unmask_irq(sb1250_irq_owner[irq], irq); | 183 | #ifdef CONFIG_SMP |
207 | } | 184 | .irq_set_affinity = sb1250_set_affinity |
208 | } | 185 | #endif |
209 | 186 | }; | |
210 | 187 | ||
211 | void __init init_sb1250_irqs(void) | 188 | void __init init_sb1250_irqs(void) |
212 | { | 189 | { |