diff options
Diffstat (limited to 'kernel/irq/handle.c')
| -rw-r--r-- | kernel/irq/handle.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 5fa6198e913..c815b42d0f5 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
| @@ -25,11 +25,10 @@ | |||
| 25 | * | 25 | * |
| 26 | * Handles spurious and unhandled IRQ's. It also prints a debugmessage. | 26 | * Handles spurious and unhandled IRQ's. It also prints a debugmessage. |
| 27 | */ | 27 | */ |
| 28 | void | 28 | void handle_bad_irq(unsigned int irq, struct irq_desc *desc) |
| 29 | handle_bad_irq(unsigned int irq, struct irq_desc *desc) | ||
| 30 | { | 29 | { |
| 31 | print_irq_desc(irq, desc); | 30 | print_irq_desc(irq, desc); |
| 32 | kstat_this_cpu.irqs[irq]++; | 31 | kstat_incr_irqs_this_cpu(irq, desc); |
| 33 | ack_bad_irq(irq); | 32 | ack_bad_irq(irq); |
| 34 | } | 33 | } |
| 35 | 34 | ||
| @@ -47,6 +46,9 @@ handle_bad_irq(unsigned int irq, struct irq_desc *desc) | |||
| 47 | * | 46 | * |
| 48 | * Controller mappings for all interrupt sources: | 47 | * Controller mappings for all interrupt sources: |
| 49 | */ | 48 | */ |
| 49 | int nr_irqs = NR_IRQS; | ||
| 50 | EXPORT_SYMBOL_GPL(nr_irqs); | ||
| 51 | |||
| 50 | struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = { | 52 | struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = { |
| 51 | [0 ... NR_IRQS-1] = { | 53 | [0 ... NR_IRQS-1] = { |
| 52 | .status = IRQ_DISABLED, | 54 | .status = IRQ_DISABLED, |
| @@ -66,7 +68,9 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = { | |||
| 66 | */ | 68 | */ |
| 67 | static void ack_bad(unsigned int irq) | 69 | static void ack_bad(unsigned int irq) |
| 68 | { | 70 | { |
| 69 | print_irq_desc(irq, irq_desc + irq); | 71 | struct irq_desc *desc = irq_to_desc(irq); |
| 72 | |||
| 73 | print_irq_desc(irq, desc); | ||
| 70 | ack_bad_irq(irq); | 74 | ack_bad_irq(irq); |
| 71 | } | 75 | } |
| 72 | 76 | ||
| @@ -131,8 +135,6 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action) | |||
| 131 | irqreturn_t ret, retval = IRQ_NONE; | 135 | irqreturn_t ret, retval = IRQ_NONE; |
| 132 | unsigned int status = 0; | 136 | unsigned int status = 0; |
| 133 | 137 | ||
| 134 | handle_dynamic_tick(action); | ||
| 135 | |||
| 136 | if (!(action->flags & IRQF_DISABLED)) | 138 | if (!(action->flags & IRQF_DISABLED)) |
| 137 | local_irq_enable_in_hardirq(); | 139 | local_irq_enable_in_hardirq(); |
| 138 | 140 | ||
| @@ -165,11 +167,12 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action) | |||
| 165 | */ | 167 | */ |
| 166 | unsigned int __do_IRQ(unsigned int irq) | 168 | unsigned int __do_IRQ(unsigned int irq) |
| 167 | { | 169 | { |
| 168 | struct irq_desc *desc = irq_desc + irq; | 170 | struct irq_desc *desc = irq_to_desc(irq); |
| 169 | struct irqaction *action; | 171 | struct irqaction *action; |
| 170 | unsigned int status; | 172 | unsigned int status; |
| 171 | 173 | ||
| 172 | kstat_this_cpu.irqs[irq]++; | 174 | kstat_incr_irqs_this_cpu(irq, desc); |
| 175 | |||
| 173 | if (CHECK_IRQ_PER_CPU(desc->status)) { | 176 | if (CHECK_IRQ_PER_CPU(desc->status)) { |
| 174 | irqreturn_t action_ret; | 177 | irqreturn_t action_ret; |
| 175 | 178 | ||
| @@ -256,8 +259,8 @@ out: | |||
| 256 | } | 259 | } |
| 257 | #endif | 260 | #endif |
| 258 | 261 | ||
| 259 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
| 260 | 262 | ||
| 263 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
| 261 | /* | 264 | /* |
| 262 | * lockdep: we want to handle all irq_desc locks as a single lock-class: | 265 | * lockdep: we want to handle all irq_desc locks as a single lock-class: |
| 263 | */ | 266 | */ |
| @@ -265,10 +268,10 @@ static struct lock_class_key irq_desc_lock_class; | |||
| 265 | 268 | ||
| 266 | void early_init_irq_lock_class(void) | 269 | void early_init_irq_lock_class(void) |
| 267 | { | 270 | { |
| 271 | struct irq_desc *desc; | ||
| 268 | int i; | 272 | int i; |
| 269 | 273 | ||
| 270 | for (i = 0; i < NR_IRQS; i++) | 274 | for_each_irq_desc(i, desc) |
| 271 | lockdep_set_class(&irq_desc[i].lock, &irq_desc_lock_class); | 275 | lockdep_set_class(&desc->lock, &irq_desc_lock_class); |
| 272 | } | 276 | } |
| 273 | |||
| 274 | #endif | 277 | #endif |
