genirq: Remove dead code
authorThomas Gleixner <tglx@linutronix.de>
Fri, 4 Feb 2011 16:33:49 +0000 (17:33 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 8 Feb 2011 18:37:13 +0000 (19:37 +0100)
CONFIG_KSTAT_IRQS_ONDEMAND does not exist. It's not worth to implement
it. Use sparse irqs if you care about memory consumption of the
interrupt layer.

Found by undertaker: http://vamos.informatik.uni-erlangen.de/trac/undertaker

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/irqdesc.c

index 282f20230e67c9c13b12ef6f30f4fb363cc84acf..a7ac6e1e7074141a04d49ea84a572bcf1853d3a5 100644 (file)
@@ -251,7 +251,6 @@ int __init early_irq_init(void)
        for (i = 0; i < count; i++) {
                desc[i].irq_data.irq = i;
                desc[i].irq_data.chip = &no_irq_chip;
-               /* TODO : do this allocation on-demand ... */
                desc[i].kstat_irqs = alloc_percpu(unsigned int);
                alloc_masks(desc + i, GFP_KERNEL, node);
                desc_smp_init(desc + i, node);
@@ -277,22 +276,6 @@ static void free_desc(unsigned int irq)
 
 static inline int alloc_descs(unsigned int start, unsigned int cnt, int node)
 {
-#if defined(CONFIG_KSTAT_IRQS_ONDEMAND)
-       struct irq_desc *desc;
-       unsigned int i;
-
-       for (i = 0; i < cnt; i++) {
-               desc = irq_to_desc(start + i);
-               if (desc && !desc->kstat_irqs) {
-                       unsigned int __percpu *stats = alloc_percpu(unsigned int);
-
-                       if (!stats)
-                               return -1;
-                       if (cmpxchg(&desc->kstat_irqs, NULL, stats) != NULL)
-                               free_percpu(stats);
-               }
-       }
-#endif
        return start;
 }
 #endif /* !CONFIG_SPARSE_IRQ */
This page took 0.026019 seconds and 5 git commands to generate.