hardirq.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* hardirq.h: PA-RISC hard IRQ support.
  2. *
  3. * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx>
  4. * Copyright (C) 2013 Helge Deller <deller@gmx.de>
  5. */
  6. #ifndef _PARISC_HARDIRQ_H
  7. #define _PARISC_HARDIRQ_H
  8. #include <linux/cache.h>
  9. #include <linux/threads.h>
  10. #include <linux/irq.h>
  11. #ifdef CONFIG_IRQSTACKS
  12. #define __ARCH_HAS_DO_SOFTIRQ
  13. #endif
  14. typedef struct {
  15. unsigned int __softirq_pending;
  16. unsigned int kernel_stack_usage;
  17. unsigned int irq_stack_usage;
  18. #ifdef CONFIG_SMP
  19. unsigned int irq_resched_count;
  20. #endif
  21. unsigned int irq_unaligned_count;
  22. unsigned int irq_fpassist_count;
  23. unsigned int irq_tlb_count;
  24. } ____cacheline_aligned irq_cpustat_t;
  25. DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
  26. #define __ARCH_IRQ_STAT
  27. #define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
  28. #define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
  29. #define __inc_irq_stat(member) __this_cpu_inc(irq_stat.member)
  30. #define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending)
  31. #define __ARCH_SET_SOFTIRQ_PENDING
  32. #define set_softirq_pending(x) \
  33. this_cpu_write(irq_stat.__softirq_pending, (x))
  34. #define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x))
  35. #define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
  36. #endif /* _PARISC_HARDIRQ_H */