hardirq.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef __BFIN_HARDIRQ_H
  2. #define __BFIN_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. unsigned int __syscall_count;
  9. struct task_struct *__ksoftirqd_task;
  10. } ____cacheline_aligned irq_cpustat_t;
  11. #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
  12. /*
  13. * We put the hardirq and softirq counter into the preemption
  14. * counter. The bitmask has the following meaning:
  15. *
  16. * - bits 0-7 are the preemption count (max preemption depth: 256)
  17. * - bits 8-15 are the softirq count (max # of softirqs: 256)
  18. * - bits 16-23 are the hardirq count (max # of hardirqs: 256)
  19. *
  20. * - ( bit 26 is the PREEMPT_ACTIVE flag. )
  21. *
  22. * PREEMPT_MASK: 0x000000ff
  23. * HARDIRQ_MASK: 0x0000ff00
  24. * SOFTIRQ_MASK: 0x00ff0000
  25. */
  26. #if NR_IRQS > 256
  27. #define HARDIRQ_BITS 9
  28. #else
  29. #define HARDIRQ_BITS 8
  30. #endif
  31. #ifdef NR_IRQS
  32. # if (1 << HARDIRQ_BITS) < NR_IRQS
  33. # error HARDIRQ_BITS is too low!
  34. # endif
  35. #endif
  36. #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
  37. #endif