Commit 5bfb5b51382f4bd01d9ced11503264d2cc74fe41

Authored by Yinghai Lu
Committed by Ingo Molnar
1 parent 372e24b0cb

irq: Add irq_node() primitive

... to return irq_desc node info without #ifdefs at the callsites.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
LKML-Reference: <4A95C350.8060308@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

include/linux/irqnr.h
... ... @@ -41,6 +41,12 @@
41 41 ; \
42 42 else
43 43  
  44 +#ifdef CONFIG_SMP
  45 +#define irq_node(irq) (irq_to_desc(irq)->node)
  46 +#else
  47 +#define irq_node(irq) 0
  48 +#endif
  49 +
44 50 #endif /* CONFIG_GENERIC_HARDIRQS */
45 51  
46 52 #define for_each_irq_nr(irq) \