1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _LINUX_IRQNR_H 3 #define _LINUX_IRQNR_H 4 5 #include <uapi/linux/irqnr.h> 6 7 8 extern int nr_irqs; 9 extern struct irq_desc *irq_to_desc(unsigned i 10 unsigned int irq_get_next_irq(unsigned int off 11 12 # define for_each_irq_desc(irq, desc) 13 for (irq = 0, desc = irq_to_desc(irq); 14 irq++, desc = irq_to_desc(irq)) 15 if (!desc) 16 ; 17 else 18 19 20 # define for_each_irq_desc_reverse(irq, desc) 21 for (irq = nr_irqs - 1, desc = irq_to_ 22 irq--, desc = irq_to_desc(irq)) 23 if (!desc) 24 ; 25 else 26 27 # define for_each_active_irq(irq) 28 for (irq = irq_get_next_irq(0); irq < 29 irq = irq_get_next_irq(irq + 1)) 30 31 #define for_each_irq_nr(irq) 32 for (irq = 0; irq < nr_irqs; irq++) 33 34 #endif 35
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.