irqflags.h 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * IRQ flags handling
  3. */
  4. #ifndef _ASM_IRQFLAGS_H
  5. #define _ASM_IRQFLAGS_H
  6. #ifndef __ASSEMBLY__
  7. /*
  8. * Get definitions for raw_local_save_flags(x), etc.
  9. */
  10. #include <asm/hw_irq.h>
  11. #else
  12. #ifdef CONFIG_TRACE_IRQFLAGS
  13. /*
  14. * Most of the CPU's IRQ-state tracing is done from assembly code; we
  15. * have to call a C function so call a wrapper that saves all the
  16. * C-clobbered registers.
  17. */
  18. #define TRACE_ENABLE_INTS bl .trace_hardirqs_on
  19. #define TRACE_DISABLE_INTS bl .trace_hardirqs_off
  20. #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \
  21. cmpdi en, 0; \
  22. bne 95f; \
  23. stb en,PACASOFTIRQEN(r13); \
  24. bl .trace_hardirqs_off; \
  25. b skip; \
  26. 95: bl .trace_hardirqs_on; \
  27. li en,1;
  28. #define TRACE_AND_RESTORE_IRQ(en) \
  29. TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \
  30. 96: stb en,PACASOFTIRQEN(r13)
  31. #else
  32. #define TRACE_ENABLE_INTS
  33. #define TRACE_DISABLE_INTS
  34. #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip)
  35. #define TRACE_AND_RESTORE_IRQ(en) \
  36. stb en,PACASOFTIRQEN(r13)
  37. #endif
  38. #endif
  39. #endif