aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-25 15:41:19 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:04 -0400
commit8c464a4b23ca283b414022ebc77787f3c7040fa7 (patch)
tree1d62a78b0af21492289d015c81270683f6bbe0bd /kernel/irq
parente492c5ae85428d4a3815d06bf308c590120b928b (diff)
sparseirq: move kstat_irqs from kstat to irq_desc - fix
fix non-sparseirq architectures. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/chip.c21
-rw-r--r--kernel/irq/handle.c10
2 files changed, 30 insertions, 1 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 9fc5e69213de..4ef555c50db8 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -327,7 +327,11 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
327 if (unlikely(desc->status & IRQ_INPROGRESS)) 327 if (unlikely(desc->status & IRQ_INPROGRESS))
328 goto out_unlock; 328 goto out_unlock;
329 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); 329 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
330#ifdef CONFIG_HAVE_DYN_ARRAY
330 kstat_irqs_this_cpu(desc)++; 331 kstat_irqs_this_cpu(desc)++;
332#else
333 kstat_irqs_this_cpu(irq)++;
334#endif
331 335
332 action = desc->action; 336 action = desc->action;
333 if (unlikely(!action || (desc->status & IRQ_DISABLED))) 337 if (unlikely(!action || (desc->status & IRQ_DISABLED)))
@@ -368,7 +372,11 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
368 if (unlikely(desc->status & IRQ_INPROGRESS)) 372 if (unlikely(desc->status & IRQ_INPROGRESS))
369 goto out_unlock; 373 goto out_unlock;
370 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); 374 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
375#ifdef CONFIG_HAVE_DYN_ARRAY
371 kstat_irqs_this_cpu(desc)++; 376 kstat_irqs_this_cpu(desc)++;
377#else
378 kstat_irqs_this_cpu(irq)++;
379#endif
372 380
373 /* 381 /*
374 * If its disabled or no action available 382 * If its disabled or no action available
@@ -415,7 +423,11 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
415 goto out; 423 goto out;
416 424
417 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); 425 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
426#ifdef CONFIG_HAVE_DYN_ARRAY
418 kstat_irqs_this_cpu(desc)++; 427 kstat_irqs_this_cpu(desc)++;
428#else
429 kstat_irqs_this_cpu(irq)++;
430#endif
419 431
420 /* 432 /*
421 * If its disabled or no action available 433 * If its disabled or no action available
@@ -479,8 +491,11 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
479 mask_ack_irq(desc, irq); 491 mask_ack_irq(desc, irq);
480 goto out_unlock; 492 goto out_unlock;
481 } 493 }
482 494#ifdef CONFIG_HAVE_DYN_ARRAY
483 kstat_irqs_this_cpu(desc)++; 495 kstat_irqs_this_cpu(desc)++;
496#else
497 kstat_irqs_this_cpu(irq)++;
498#endif
484 499
485 /* Start handling the irq */ 500 /* Start handling the irq */
486 desc->chip->ack(irq); 501 desc->chip->ack(irq);
@@ -535,7 +550,11 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
535{ 550{
536 irqreturn_t action_ret; 551 irqreturn_t action_ret;
537 552
553#ifdef CONFIG_HAVE_DYN_ARRAY
538 kstat_irqs_this_cpu(desc)++; 554 kstat_irqs_this_cpu(desc)++;
555#else
556 kstat_irqs_this_cpu(irq)++;
557#endif
539 558
540 if (desc->chip->ack) 559 if (desc->chip->ack)
541 desc->chip->ack(irq); 560 desc->chip->ack(irq);
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index d638a911cbc1..eae69373a9c6 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -34,7 +34,11 @@ void
34handle_bad_irq(unsigned int irq, struct irq_desc *desc) 34handle_bad_irq(unsigned int irq, struct irq_desc *desc)
35{ 35{
36 print_irq_desc(irq, desc); 36 print_irq_desc(irq, desc);
37#ifdef CONFIG_HAVE_DYN_ARRAY
37 kstat_irqs_this_cpu(desc)++; 38 kstat_irqs_this_cpu(desc)++;
39#else
40 kstat_irqs_this_cpu(irq)++;
41#endif
38 ack_bad_irq(irq); 42 ack_bad_irq(irq);
39} 43}
40 44
@@ -401,7 +405,11 @@ unsigned int __do_IRQ(unsigned int irq)
401 struct irqaction *action; 405 struct irqaction *action;
402 unsigned int status; 406 unsigned int status;
403 407
408#ifdef CONFIG_HAVE_DYN_ARRAY
404 kstat_irqs_this_cpu(desc)++; 409 kstat_irqs_this_cpu(desc)++;
410#else
411 kstat_irqs_this_cpu(irq)++;
412#endif
405 if (CHECK_IRQ_PER_CPU(desc->status)) { 413 if (CHECK_IRQ_PER_CPU(desc->status)) {
406 irqreturn_t action_ret; 414 irqreturn_t action_ret;
407 415
@@ -501,10 +509,12 @@ void early_init_irq_lock_class(void)
501} 509}
502#endif 510#endif
503 511
512#ifdef CONFIG_HAVE_DYN_ARRAY
504unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) 513unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
505{ 514{
506 struct irq_desc *desc = irq_to_desc(irq); 515 struct irq_desc *desc = irq_to_desc(irq);
507 return desc->kstat_irqs[cpu]; 516 return desc->kstat_irqs[cpu];
508} 517}
518#endif
509EXPORT_SYMBOL(kstat_irqs_cpu); 519EXPORT_SYMBOL(kstat_irqs_cpu);
510 520