]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/irq/handle.c
generic: add irq_desc in function in parameter
[linux-2.6-omap-h63xx.git] / kernel / irq / handle.c
index 8e55dbe50afc759b5ff859d7a9c36336c8979d8d..e1d787e9169b363476890cf66cc3ee8327cae336 100644 (file)
@@ -197,6 +197,21 @@ struct irq_desc *irq_to_desc(unsigned int irq)
         *  we run out of pre-allocate ones, allocate more
         */
        printk(KERN_DEBUG "try to get more irq_desc %d\n", nr_irq_desc);
+       {
+               /* double check if some one mess up the list */
+               struct irq_desc *desc;
+               int count = 0;
+
+               desc = &sparse_irqs[0];
+               while (desc) {
+                       printk(KERN_DEBUG "found irq_desc for irq %d\n", desc->irq);
+                       if (desc->next)
+                               printk(KERN_DEBUG "found irq_desc for irq %d and next will be irq %d\n", desc->irq, desc->next->irq);
+                       desc = desc->next;
+                       count++;
+               }
+               printk(KERN_DEBUG "all preallocted %d\n", count);
+       }
 
        total_bytes = sizeof(struct irq_desc) * nr_irq_desc;
        if (after_bootmem)
@@ -221,6 +236,21 @@ struct irq_desc *irq_to_desc(unsigned int irq)
 
        desc->irq = irq;
        desc_pri->next = desc;
+       {
+               /* double check if some one mess up the list */
+               struct irq_desc *desc;
+               int count = 0;
+
+               desc = &sparse_irqs[0];
+               while (desc) {
+                       printk(KERN_DEBUG "1 found irq_desc for irq %d\n", desc->irq);
+                       if (desc->next)
+                               printk(KERN_DEBUG "1 found irq_desc for irq %d and next will be irq %d\n", desc->irq, desc->next->irq);
+                       desc = desc->next;
+                       count++;
+               }
+               printk(KERN_DEBUG "1 all preallocted %d\n", count);
+       }
 
        return desc;
 }