hardirq.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #define NR_IPI 5
  7. typedef struct {
  8. unsigned int __softirq_pending;
  9. #ifdef CONFIG_SMP
  10. unsigned int ipi_irqs[NR_IPI];
  11. #endif
  12. } ____cacheline_aligned irq_cpustat_t;
  13. #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
  14. #define __inc_irq_stat(cpu, member) __IRQ_STAT(cpu, member)++
  15. #define __get_irq_stat(cpu, member) __IRQ_STAT(cpu, member)
  16. #ifdef CONFIG_SMP
  17. u64 smp_irq_stat_cpu(unsigned int cpu);
  18. #else
  19. #define smp_irq_stat_cpu(cpu) 0
  20. #endif
  21. #define arch_irq_stat_cpu smp_irq_stat_cpu
  22. #if NR_IRQS > 512
  23. #define HARDIRQ_BITS 10
  24. #elif NR_IRQS > 256
  25. #define HARDIRQ_BITS 9
  26. #else
  27. #define HARDIRQ_BITS 8
  28. #endif
  29. /*
  30. * The hardirq mask has to be large enough to have space
  31. * for potentially all IRQ sources in the system nesting
  32. * on a single CPU:
  33. */
  34. #if (1 << HARDIRQ_BITS) < NR_IRQS
  35. # error HARDIRQ_BITS is too low!
  36. #endif
  37. #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
  38. #endif /* __ASM_HARDIRQ_H */