diff options
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 475e8a71bcdc..0133f4f9e9f0 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -168,7 +168,7 @@ EXPORT_SYMBOL(set_irq_data); | |||
168 | /** | 168 | /** |
169 | * set_irq_data - set irq type data for an irq | 169 | * set_irq_data - set irq type data for an irq |
170 | * @irq: Interrupt number | 170 | * @irq: Interrupt number |
171 | * @data: Pointer to interrupt specific data | 171 | * @entry: Pointer to MSI descriptor data |
172 | * | 172 | * |
173 | * Set the hardware irq controller data for an irq | 173 | * Set the hardware irq controller data for an irq |
174 | */ | 174 | */ |
@@ -230,10 +230,6 @@ static void default_enable(unsigned int irq) | |||
230 | */ | 230 | */ |
231 | static void default_disable(unsigned int irq) | 231 | static void default_disable(unsigned int irq) |
232 | { | 232 | { |
233 | struct irq_desc *desc = irq_desc + irq; | ||
234 | |||
235 | if (!(desc->status & IRQ_DELAYED_DISABLE)) | ||
236 | desc->chip->mask(irq); | ||
237 | } | 233 | } |
238 | 234 | ||
239 | /* | 235 | /* |
@@ -298,13 +294,18 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc) | |||
298 | 294 | ||
299 | if (unlikely(desc->status & IRQ_INPROGRESS)) | 295 | if (unlikely(desc->status & IRQ_INPROGRESS)) |
300 | goto out_unlock; | 296 | goto out_unlock; |
301 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); | ||
302 | kstat_cpu(cpu).irqs[irq]++; | 297 | kstat_cpu(cpu).irqs[irq]++; |
303 | 298 | ||
304 | action = desc->action; | 299 | action = desc->action; |
305 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) | 300 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { |
301 | if (desc->chip->mask) | ||
302 | desc->chip->mask(irq); | ||
303 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); | ||
304 | desc->status |= IRQ_PENDING; | ||
306 | goto out_unlock; | 305 | goto out_unlock; |
306 | } | ||
307 | 307 | ||
308 | desc->status &= ~(IRQ_REPLAY | IRQ_WAITING | IRQ_PENDING); | ||
308 | desc->status |= IRQ_INPROGRESS; | 309 | desc->status |= IRQ_INPROGRESS; |
309 | spin_unlock(&desc->lock); | 310 | spin_unlock(&desc->lock); |
310 | 311 | ||
@@ -396,11 +397,13 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) | |||
396 | 397 | ||
397 | /* | 398 | /* |
398 | * If its disabled or no action available | 399 | * If its disabled or no action available |
399 | * keep it masked and get out of here | 400 | * then mask it and get out of here: |
400 | */ | 401 | */ |
401 | action = desc->action; | 402 | action = desc->action; |
402 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { | 403 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { |
403 | desc->status |= IRQ_PENDING; | 404 | desc->status |= IRQ_PENDING; |
405 | if (desc->chip->mask) | ||
406 | desc->chip->mask(irq); | ||
404 | goto out; | 407 | goto out; |
405 | } | 408 | } |
406 | 409 | ||
@@ -562,10 +565,8 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
562 | 565 | ||
563 | /* Uninstall? */ | 566 | /* Uninstall? */ |
564 | if (handle == handle_bad_irq) { | 567 | if (handle == handle_bad_irq) { |
565 | if (desc->chip != &no_irq_chip) { | 568 | if (desc->chip != &no_irq_chip) |
566 | desc->chip->mask(irq); | 569 | mask_ack_irq(desc, irq); |
567 | desc->chip->ack(irq); | ||
568 | } | ||
569 | desc->status |= IRQ_DISABLED; | 570 | desc->status |= IRQ_DISABLED; |
570 | desc->depth = 1; | 571 | desc->depth = 1; |
571 | } | 572 | } |