powerpc virq: new routine virq_to_hw

Geoff Levand geoffrey.levand at am.sony.com
Sat Aug 26 09:02:35 EST 2006


Ben,

Please consider this accessor routine which hides the details
of the map.

Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>

---
Index: cell--common--4/include/asm-powerpc/irq.h
===================================================================
--- cell--common--4.orig/include/asm-powerpc/irq.h
+++ cell--common--4/include/asm-powerpc/irq.h
@@ -136,6 +136,11 @@
 
 extern struct irq_map_entry irq_map[NR_IRQS];
 
+static inline irq_hw_number_t
+virq_to_hw (unsigned int virq)
+{
+	return irq_map[virq].hwirq;
+}
 
 /**
  * irq_alloc_host - Allocate a new irq_host data structure




More information about the Linuxppc-dev mailing list