Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 71e736a7 authored by Alan Kao's avatar Alan Kao Committed by Palmer Dabbelt
Browse files

riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support



Cc: Greentime Hu <greentime@andestech.com>
Signed-off-by: default avatarAlan Kao <alankao@andestech.com>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent bc1a4c3a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
#define HAVE_FUNCTION_GRAPH_FP_TEST
#endif

#define ARCH_SUPPORTS_FTRACE_OPS 1
#ifndef __ASSEMBLY__
void _mcount(void);
static inline unsigned long ftrace_call_adjust(unsigned long addr)
+3 −0
Original line number Diff line number Diff line
@@ -74,9 +74,12 @@ ENTRY(ftrace_caller)
	/*
	 * a0: the address in the caller when calling ftrace_caller
	 * a1: the caller's return address
	 * a2: the address of global variable function_trace_op
	 */
	ld	a1, -8(s0)
	addi	a0, ra, -MCOUNT_INSN_SIZE
	la	t5, function_trace_op
	ld	a2, 0(t5)

#ifdef CONFIG_FUNCTION_GRAPH_TRACER
	/*