diff options
Diffstat (limited to 'kernel/irq')
| -rw-r--r-- | kernel/irq/chip.c | 2 | ||||
| -rw-r--r-- | kernel/irq/manage.c | 9 | ||||
| -rw-r--r-- | kernel/irq/spurious.c | 6 |
3 files changed, 14 insertions, 3 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 2d0dc3efe813..ebfd24a41858 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
| @@ -233,6 +233,8 @@ void irq_chip_set_defaults(struct irq_chip *chip) | |||
| 233 | chip->shutdown = chip->disable; | 233 | chip->shutdown = chip->disable; |
| 234 | if (!chip->name) | 234 | if (!chip->name) |
| 235 | chip->name = chip->typename; | 235 | chip->name = chip->typename; |
| 236 | if (!chip->end) | ||
| 237 | chip->end = dummy_irq_chip.end; | ||
| 236 | } | 238 | } |
| 237 | 239 | ||
| 238 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) | 240 | static inline void mask_ack_irq(struct irq_desc *desc, int irq) |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 6879202afe9a..b385878c6e80 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
| @@ -216,6 +216,7 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
| 216 | { | 216 | { |
| 217 | struct irq_desc *desc = irq_desc + irq; | 217 | struct irq_desc *desc = irq_desc + irq; |
| 218 | struct irqaction *old, **p; | 218 | struct irqaction *old, **p; |
| 219 | const char *old_name = NULL; | ||
| 219 | unsigned long flags; | 220 | unsigned long flags; |
| 220 | int shared = 0; | 221 | int shared = 0; |
| 221 | 222 | ||
| @@ -255,8 +256,10 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
| 255 | * set the trigger type must match. | 256 | * set the trigger type must match. |
| 256 | */ | 257 | */ |
| 257 | if (!((old->flags & new->flags) & IRQF_SHARED) || | 258 | if (!((old->flags & new->flags) & IRQF_SHARED) || |
| 258 | ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) | 259 | ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) { |
| 260 | old_name = old->name; | ||
| 259 | goto mismatch; | 261 | goto mismatch; |
| 262 | } | ||
| 260 | 263 | ||
| 261 | #if defined(CONFIG_IRQ_PER_CPU) | 264 | #if defined(CONFIG_IRQ_PER_CPU) |
| 262 | /* All handlers must agree on per-cpuness */ | 265 | /* All handlers must agree on per-cpuness */ |
| @@ -322,11 +325,13 @@ int setup_irq(unsigned int irq, struct irqaction *new) | |||
| 322 | return 0; | 325 | return 0; |
| 323 | 326 | ||
| 324 | mismatch: | 327 | mismatch: |
| 325 | spin_unlock_irqrestore(&desc->lock, flags); | ||
| 326 | if (!(new->flags & IRQF_PROBE_SHARED)) { | 328 | if (!(new->flags & IRQF_PROBE_SHARED)) { |
| 327 | printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); | 329 | printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq); |
| 330 | if (old_name) | ||
| 331 | printk(KERN_ERR "current handler: %s\n", old_name); | ||
| 328 | dump_stack(); | 332 | dump_stack(); |
| 329 | } | 333 | } |
| 334 | spin_unlock_irqrestore(&desc->lock, flags); | ||
| 330 | return -EBUSY; | 335 | return -EBUSY; |
| 331 | } | 336 | } |
| 332 | 337 | ||
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 543ea2e5ad93..9c7e2e4c1fe7 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
| @@ -147,7 +147,11 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc, | |||
| 147 | if (unlikely(irqfixup)) { | 147 | if (unlikely(irqfixup)) { |
| 148 | /* Don't punish working computers */ | 148 | /* Don't punish working computers */ |
| 149 | if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { | 149 | if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) { |
| 150 | int ok = misrouted_irq(irq); | 150 | int ok; |
| 151 | |||
| 152 | spin_unlock(&desc->lock); | ||
| 153 | ok = misrouted_irq(irq); | ||
| 154 | spin_lock(&desc->lock); | ||
| 151 | if (action_ret == IRQ_NONE) | 155 | if (action_ret == IRQ_NONE) |
| 152 | desc->irqs_unhandled -= ok; | 156 | desc->irqs_unhandled -= ok; |
| 153 | } | 157 | } |
