[PATCH] riscv/ftrace: Export _mcount when FUNCTION_GRAPH_TRACER isn't set

From: Palmer Dabbelt
Date: Mon Jun 04 2018 - 16:31:46 EST

From: Alan Kao <alankao@xxxxxxxxxxxxx>

The EXPORT_SYMBOL(_mcount) for RISC-V ended up inside a
CONFIG_FUNCTION_GRAPH_TRACER ifdef. If you enable modules without
enabling CONFIG_FUNCTION_GRAPH_TRACER 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 <alankao@xxxxxxxxxxxxx>
Cc: Greentime Hu <greentime@xxxxxxxxxxxxx>
Cc: Zong Li <zong@xxxxxxxxxxxxx>
Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxx>
arch/riscv/kernel/mcount.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/mcount.S b/arch/riscv/kernel/mcount.S
index ce9bdc57a2a1..5721624886a1 100644
--- a/arch/riscv/kernel/mcount.S
+++ b/arch/riscv/kernel/mcount.S
@@ -126,5 +126,5 @@ do_trace: