hardirq.h 1.1 KB

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