hardirq.h 939 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef __ASM_HARDIRQ_H
  2. #define __ASM_HARDIRQ_H
  3. #include <linux/cache.h>
  4. #include <linux/threads.h>
  5. #include <asm/irq.h>
  6. typedef struct {
  7. unsigned int __softirq_pending;
  8. #ifdef CONFIG_LOCAL_TIMERS
  9. unsigned int local_timer_irqs;
  10. #endif
  11. #ifdef CONFIG_SMP
  12. unsigned int ipi_irqs;
  13. #endif
  14. } ____cacheline_aligned irq_cpustat_t;
  15. #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
  16. #define __inc_irq_stat(cpu, member) __IRQ_STAT(cpu, member)++
  17. #define __get_irq_stat(cpu, member) __IRQ_STAT(cpu, member)
  18. #if NR_IRQS > 512
  19. #define HARDIRQ_BITS 10
  20. #elif NR_IRQS > 256
  21. #define HARDIRQ_BITS 9
  22. #else
  23. #define HARDIRQ_BITS 8
  24. #endif
  25. /*
  26. * The hardirq mask has to be large enough to have space
  27. * for potentially all IRQ sources in the system nesting
  28. * on a single CPU:
  29. */
  30. #if (1 << HARDIRQ_BITS) < NR_IRQS
  31. # error HARDIRQ_BITS is too low!
  32. #endif
  33. #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
  34. #endif /* __ASM_HARDIRQ_H */