thunk_32.S 656 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Trampoline to trace irqs off. (otherwise CALLER_ADDR1 might crash)
  3. * Copyright 2008 by Steven Rostedt, Red Hat, Inc
  4. * (inspired by Andi Kleen's thunk_64.S)
  5. * Subject to the GNU public license, v.2. No warranty of any kind.
  6. */
  7. #include <linux/linkage.h>
  8. #ifdef CONFIG_TRACE_IRQFLAGS
  9. /* put return address in eax (arg1) */
  10. .macro thunk_ra name,func
  11. .globl \name
  12. \name:
  13. pushl %eax
  14. pushl %ecx
  15. pushl %edx
  16. /* Place EIP in the arg1 */
  17. movl 3*4(%esp), %eax
  18. call \func
  19. popl %edx
  20. popl %ecx
  21. popl %eax
  22. ret
  23. .endm
  24. thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller
  25. thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller
  26. #endif