genirq/matrix: Exclude managed interrupts in irq_matrix_allocated()
[linux-2.6-microblaze.git] / kernel / irq / matrix.c
index 1698e77..75d0ae4 100644 (file)
@@ -466,16 +466,16 @@ unsigned int irq_matrix_reserved(struct irq_matrix *m)
 }
 
 /**
- * irq_matrix_allocated - Get the number of allocated irqs on the local cpu
+ * irq_matrix_allocated - Get the number of allocated non-managed irqs on the local CPU
  * @m:         Pointer to the matrix to search
  *
- * This returns number of allocated irqs
+ * This returns number of allocated non-managed interrupts.
  */
 unsigned int irq_matrix_allocated(struct irq_matrix *m)
 {
        struct cpumap *cm = this_cpu_ptr(m->maps);
 
-       return cm->allocated;
+       return cm->allocated - cm->managed_allocated;
 }
 
 #ifdef CONFIG_GENERIC_IRQ_DEBUGFS