hardirq.h 752 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifdef __KERNEL__
  2. #ifndef __ASM_HARDIRQ_H
  3. #define __ASM_HARDIRQ_H
  4. #include <linux/threads.h>
  5. #include <linux/irq.h>
  6. typedef struct {
  7. unsigned int __softirq_pending;
  8. } ____cacheline_aligned irq_cpustat_t;
  9. #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
  10. #if NR_IRQS > 256
  11. #define HARDIRQ_BITS 9
  12. #else
  13. #define HARDIRQ_BITS 8
  14. #endif
  15. /*
  16. * The hardirq mask has to be large enough to have
  17. * space for potentially all IRQ sources in the system
  18. * nesting on a single CPU:
  19. */
  20. #if (1 << HARDIRQ_BITS) < NR_IRQS
  21. # error HARDIRQ_BITS is too low!
  22. #endif
  23. static inline void ack_bad_irq(int irq)
  24. {
  25. printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
  26. BUG();
  27. }
  28. #endif /* __ASM_HARDIRQ_H */
  29. #endif /* __KERNEL__ */