diff options
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 03099d521f5e..616ec1c6b06f 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -34,7 +34,6 @@ int irq_set_chip(unsigned int irq, struct irq_chip *chip) | |||
34 | if (!chip) | 34 | if (!chip) |
35 | chip = &no_irq_chip; | 35 | chip = &no_irq_chip; |
36 | 36 | ||
37 | irq_chip_set_defaults(chip); | ||
38 | desc->irq_data.chip = chip; | 37 | desc->irq_data.chip = chip; |
39 | irq_put_desc_unlock(desc, flags); | 38 | irq_put_desc_unlock(desc, flags); |
40 | /* | 39 | /* |
@@ -141,25 +140,21 @@ EXPORT_SYMBOL_GPL(irq_get_irq_data); | |||
141 | static void irq_state_clr_disabled(struct irq_desc *desc) | 140 | static void irq_state_clr_disabled(struct irq_desc *desc) |
142 | { | 141 | { |
143 | irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); | 142 | irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); |
144 | irq_compat_clr_disabled(desc); | ||
145 | } | 143 | } |
146 | 144 | ||
147 | static void irq_state_set_disabled(struct irq_desc *desc) | 145 | static void irq_state_set_disabled(struct irq_desc *desc) |
148 | { | 146 | { |
149 | irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED); | 147 | irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED); |
150 | irq_compat_set_disabled(desc); | ||
151 | } | 148 | } |
152 | 149 | ||
153 | static void irq_state_clr_masked(struct irq_desc *desc) | 150 | static void irq_state_clr_masked(struct irq_desc *desc) |
154 | { | 151 | { |
155 | irqd_clear(&desc->irq_data, IRQD_IRQ_MASKED); | 152 | irqd_clear(&desc->irq_data, IRQD_IRQ_MASKED); |
156 | irq_compat_clr_masked(desc); | ||
157 | } | 153 | } |
158 | 154 | ||
159 | static void irq_state_set_masked(struct irq_desc *desc) | 155 | static void irq_state_set_masked(struct irq_desc *desc) |
160 | { | 156 | { |
161 | irqd_set(&desc->irq_data, IRQD_IRQ_MASKED); | 157 | irqd_set(&desc->irq_data, IRQD_IRQ_MASKED); |
162 | irq_compat_set_masked(desc); | ||
163 | } | 158 | } |
164 | 159 | ||
165 | int irq_startup(struct irq_desc *desc) | 160 | int irq_startup(struct irq_desc *desc) |
@@ -209,126 +204,6 @@ void irq_disable(struct irq_desc *desc) | |||
209 | } | 204 | } |
210 | } | 205 | } |
211 | 206 | ||
212 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
213 | /* Temporary migration helpers */ | ||
214 | static void compat_irq_mask(struct irq_data *data) | ||
215 | { | ||
216 | data->chip->mask(data->irq); | ||
217 | } | ||
218 | |||
219 | static void compat_irq_unmask(struct irq_data *data) | ||
220 | { | ||
221 | data->chip->unmask(data->irq); | ||
222 | } | ||
223 | |||
224 | static void compat_irq_ack(struct irq_data *data) | ||
225 | { | ||
226 | data->chip->ack(data->irq); | ||
227 | } | ||
228 | |||
229 | static void compat_irq_mask_ack(struct irq_data *data) | ||
230 | { | ||
231 | data->chip->mask_ack(data->irq); | ||
232 | } | ||
233 | |||
234 | static void compat_irq_eoi(struct irq_data *data) | ||
235 | { | ||
236 | data->chip->eoi(data->irq); | ||
237 | } | ||
238 | |||
239 | static void compat_irq_enable(struct irq_data *data) | ||
240 | { | ||
241 | data->chip->enable(data->irq); | ||
242 | } | ||
243 | |||
244 | static void compat_irq_disable(struct irq_data *data) | ||
245 | { | ||
246 | data->chip->disable(data->irq); | ||
247 | } | ||
248 | |||
249 | static void compat_irq_shutdown(struct irq_data *data) | ||
250 | { | ||
251 | data->chip->shutdown(data->irq); | ||
252 | } | ||
253 | |||
254 | static unsigned int compat_irq_startup(struct irq_data *data) | ||
255 | { | ||
256 | return data->chip->startup(data->irq); | ||
257 | } | ||
258 | |||
259 | static int compat_irq_set_affinity(struct irq_data *data, | ||
260 | const struct cpumask *dest, bool force) | ||
261 | { | ||
262 | return data->chip->set_affinity(data->irq, dest); | ||
263 | } | ||
264 | |||
265 | static int compat_irq_set_type(struct irq_data *data, unsigned int type) | ||
266 | { | ||
267 | return data->chip->set_type(data->irq, type); | ||
268 | } | ||
269 | |||
270 | static int compat_irq_set_wake(struct irq_data *data, unsigned int on) | ||
271 | { | ||
272 | return data->chip->set_wake(data->irq, on); | ||
273 | } | ||
274 | |||
275 | static int compat_irq_retrigger(struct irq_data *data) | ||
276 | { | ||
277 | return data->chip->retrigger(data->irq); | ||
278 | } | ||
279 | |||
280 | static void compat_bus_lock(struct irq_data *data) | ||
281 | { | ||
282 | data->chip->bus_lock(data->irq); | ||
283 | } | ||
284 | |||
285 | static void compat_bus_sync_unlock(struct irq_data *data) | ||
286 | { | ||
287 | data->chip->bus_sync_unlock(data->irq); | ||
288 | } | ||
289 | #endif | ||
290 | |||
291 | /* | ||
292 | * Fixup enable/disable function pointers | ||
293 | */ | ||
294 | void irq_chip_set_defaults(struct irq_chip *chip) | ||
295 | { | ||
296 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
297 | if (chip->enable) | ||
298 | chip->irq_enable = compat_irq_enable; | ||
299 | if (chip->disable) | ||
300 | chip->irq_disable = compat_irq_disable; | ||
301 | if (chip->shutdown) | ||
302 | chip->irq_shutdown = compat_irq_shutdown; | ||
303 | if (chip->startup) | ||
304 | chip->irq_startup = compat_irq_startup; | ||
305 | if (!chip->end) | ||
306 | chip->end = dummy_irq_chip.end; | ||
307 | if (chip->bus_lock) | ||
308 | chip->irq_bus_lock = compat_bus_lock; | ||
309 | if (chip->bus_sync_unlock) | ||
310 | chip->irq_bus_sync_unlock = compat_bus_sync_unlock; | ||
311 | if (chip->mask) | ||
312 | chip->irq_mask = compat_irq_mask; | ||
313 | if (chip->unmask) | ||
314 | chip->irq_unmask = compat_irq_unmask; | ||
315 | if (chip->ack) | ||
316 | chip->irq_ack = compat_irq_ack; | ||
317 | if (chip->mask_ack) | ||
318 | chip->irq_mask_ack = compat_irq_mask_ack; | ||
319 | if (chip->eoi) | ||
320 | chip->irq_eoi = compat_irq_eoi; | ||
321 | if (chip->set_affinity) | ||
322 | chip->irq_set_affinity = compat_irq_set_affinity; | ||
323 | if (chip->set_type) | ||
324 | chip->irq_set_type = compat_irq_set_type; | ||
325 | if (chip->set_wake) | ||
326 | chip->irq_set_wake = compat_irq_set_wake; | ||
327 | if (chip->retrigger) | ||
328 | chip->irq_retrigger = compat_irq_retrigger; | ||
329 | #endif | ||
330 | } | ||
331 | |||
332 | static inline void mask_ack_irq(struct irq_desc *desc) | 207 | static inline void mask_ack_irq(struct irq_desc *desc) |
333 | { | 208 | { |
334 | if (desc->irq_data.chip->irq_mask_ack) | 209 | if (desc->irq_data.chip->irq_mask_ack) |
@@ -381,7 +256,6 @@ void handle_nested_irq(unsigned int irq) | |||
381 | if (unlikely(!action || irqd_irq_disabled(&desc->irq_data))) | 256 | if (unlikely(!action || irqd_irq_disabled(&desc->irq_data))) |
382 | goto out_unlock; | 257 | goto out_unlock; |
383 | 258 | ||
384 | irq_compat_set_progress(desc); | ||
385 | irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS); | 259 | irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS); |
386 | raw_spin_unlock_irq(&desc->lock); | 260 | raw_spin_unlock_irq(&desc->lock); |
387 | 261 | ||
@@ -391,7 +265,6 @@ void handle_nested_irq(unsigned int irq) | |||
391 | 265 | ||
392 | raw_spin_lock_irq(&desc->lock); | 266 | raw_spin_lock_irq(&desc->lock); |
393 | irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS); | 267 | irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS); |
394 | irq_compat_clr_progress(desc); | ||
395 | 268 | ||
396 | out_unlock: | 269 | out_unlock: |
397 | raw_spin_unlock_irq(&desc->lock); | 270 | raw_spin_unlock_irq(&desc->lock); |
@@ -514,7 +387,6 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) | |||
514 | * then mask it and get out of here: | 387 | * then mask it and get out of here: |
515 | */ | 388 | */ |
516 | if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { | 389 | if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { |
517 | irq_compat_set_pending(desc); | ||
518 | desc->istate |= IRQS_PENDING; | 390 | desc->istate |= IRQS_PENDING; |
519 | mask_irq(desc); | 391 | mask_irq(desc); |
520 | goto out; | 392 | goto out; |
@@ -567,7 +439,6 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
567 | if (unlikely(irqd_irq_disabled(&desc->irq_data) || | 439 | if (unlikely(irqd_irq_disabled(&desc->irq_data) || |
568 | irqd_irq_inprogress(&desc->irq_data) || !desc->action)) { | 440 | irqd_irq_inprogress(&desc->irq_data) || !desc->action)) { |
569 | if (!irq_check_poll(desc)) { | 441 | if (!irq_check_poll(desc)) { |
570 | irq_compat_set_pending(desc); | ||
571 | desc->istate |= IRQS_PENDING; | 442 | desc->istate |= IRQS_PENDING; |
572 | mask_ack_irq(desc); | 443 | mask_ack_irq(desc); |
573 | goto out_unlock; | 444 | goto out_unlock; |