From: Alan Kao Date: Tue, 8 May 2018 03:21:57 +0000 (+0800) Subject: riscv/ftrace: Export _mcount when DYNAMIC_FTRACE isn't set X-Git-Tag: v4.18-rc1~11^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1dd985229d5fc19359250bc0e4235aff217672b2;p=users%2Fjedix%2Flinux-maple.git riscv/ftrace: Export _mcount when DYNAMIC_FTRACE isn't set The EXPORT_SYMBOL(_mcount) for RISC-V ended up inside a CONFIG_DYNAMIC_FTRACE ifdef. If you enable modules without enabling CONFIG_DYNAMIC_FTRACE then you'll get a build error without this patch because the modules won't be able to find _mcount. The new behavior is to export _mcount whenever CONFIG_FUNCTION_TRACER is defined. This matches what every other architecture is doing. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Zong Li Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/kernel/mcount.S b/arch/riscv/kernel/mcount.S index ce9bdc57a2a16..5721624886a1c 100644 --- a/arch/riscv/kernel/mcount.S +++ b/arch/riscv/kernel/mcount.S @@ -126,5 +126,5 @@ do_trace: RESTORE_ABI_STATE ret ENDPROC(_mcount) -EXPORT_SYMBOL(_mcount) #endif +EXPORT_SYMBOL(_mcount)