aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2009-01-07 18:03:13 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-10 22:46:26 -0500
commitd7e51e66899f95dabc89b4d4c6674a6e50fa37fc (patch)
tree5b4cc72a4e411d6962ce9ce7258abf2bac0204d4 /kernel/irq
parente8b722f487589a1f60ca27adc695494f188d404e (diff)
sparseirq: make some func to be used with genirq
Impact: clean up sparseirq fallout on random.c Ingo suggested to change some ifdef from SPARSE_IRQ to GENERIC_HARDIRQS so we could some #ifdef later if all arch support genirq Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/handle.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index c20db0be9173..48299a8a22f8 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -213,6 +213,7 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
213 } 213 }
214}; 214};
215 215
216static unsigned int kstat_irqs_all[NR_IRQS][NR_CPUS];
216int __init early_irq_init(void) 217int __init early_irq_init(void)
217{ 218{
218 struct irq_desc *desc; 219 struct irq_desc *desc;
@@ -222,8 +223,10 @@ int __init early_irq_init(void)
222 desc = irq_desc; 223 desc = irq_desc;
223 count = ARRAY_SIZE(irq_desc); 224 count = ARRAY_SIZE(irq_desc);
224 225
225 for (i = 0; i < count; i++) 226 for (i = 0; i < count; i++) {
226 desc[i].irq = i; 227 desc[i].irq = i;
228 desc[i].kstat_irqs = kstat_irqs_all[i];
229 }
227 230
228 return arch_early_irq_init(); 231 return arch_early_irq_init();
229} 232}
@@ -451,12 +454,10 @@ void early_init_irq_lock_class(void)
451 } 454 }
452} 455}
453 456
454#ifdef CONFIG_SPARSE_IRQ
455unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) 457unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
456{ 458{
457 struct irq_desc *desc = irq_to_desc(irq); 459 struct irq_desc *desc = irq_to_desc(irq);
458 return desc ? desc->kstat_irqs[cpu] : 0; 460 return desc ? desc->kstat_irqs[cpu] : 0;
459} 461}
460#endif
461EXPORT_SYMBOL(kstat_irqs_cpu); 462EXPORT_SYMBOL(kstat_irqs_cpu);
462 463