LKML Archive on
help / color / mirror / Atom feed
From: Palmer Dabbelt <>
	Greentime Hu <>,
	Zong Li <>, Palmer Dabbelt <>
Subject: [PATCH] riscv/ftrace: Export _mcount when FUNCTION_GRAPH_TRACER isn't set
Date: Mon,  4 Jun 2018 13:30:28 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Alan Kao <>

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 <>
Cc: Greentime Hu <>
Cc: Zong Li <>
Signed-off-by: Palmer Dabbelt <>
 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:

  reply	other threads:[~2018-06-04 20:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  3:21 [PATCH] riscv/ftrace: Fix the problem modules cannot find _mcount Alan Kao
2018-05-08 13:11 ` Steven Rostedt
2018-05-09  2:36   ` Alan Kao
2018-05-09  3:02     ` Steven Rostedt
2018-06-04 20:30 ` Palmer Dabbelt
2018-06-04 20:30   ` Palmer Dabbelt [this message]
2018-06-05  1:12     ` [PATCH] riscv/ftrace: Export _mcount when FUNCTION_GRAPH_TRACER isn't set Alan Kao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] riscv/ftrace: Export _mcount when FUNCTION_GRAPH_TRACER isn'\''t set' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).