ftrace.h 723 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __ASM_SH_FTRACE_H
  2. #define __ASM_SH_FTRACE_H
  3. #ifdef CONFIG_FUNCTION_TRACER
  4. #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */
  5. #ifndef __ASSEMBLY__
  6. extern void mcount(void);
  7. #define MCOUNT_ADDR ((long)(mcount))
  8. #ifdef CONFIG_DYNAMIC_FTRACE
  9. #define CALLER_ADDR ((long)(ftrace_caller))
  10. #define STUB_ADDR ((long)(ftrace_stub))
  11. #define MCOUNT_INSN_OFFSET ((STUB_ADDR - CALLER_ADDR) >> 1)
  12. struct dyn_arch_ftrace {
  13. /* No extra data needed on sh */
  14. };
  15. #endif /* CONFIG_DYNAMIC_FTRACE */
  16. static inline unsigned long ftrace_call_adjust(unsigned long addr)
  17. {
  18. /* 'addr' is the memory table address. */
  19. return addr;
  20. }
  21. #endif /* __ASSEMBLY__ */
  22. #endif /* CONFIG_FUNCTION_TRACER */
  23. #endif /* __ASM_SH_FTRACE_H */