hardirq.h 778 B

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