irqflags.h 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. stb en,PACASOFTIRQEN(r13); \
  31. 96:
  32. #else
  33. #define TRACE_ENABLE_INTS
  34. #define TRACE_DISABLE_INTS
  35. #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip)
  36. #define TRACE_AND_RESTORE_IRQ(en) \
  37. stb en,PACASOFTIRQEN(r13)
  38. #endif
  39. #endif
  40. #endif