Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp305013imm; Mon, 4 Jun 2018 18:14:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKckmlwgGB62ZJnBwR8PHaLSCJ7wlP086GjhoPkUqcFi5UCw+ennoY8y1r1oBDmxOvk4zCK X-Received: by 2002:aa7:8386:: with SMTP id u6-v6mr23398368pfm.253.1528161243712; Mon, 04 Jun 2018 18:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528161243; cv=none; d=google.com; s=arc-20160816; b=RXt0uF+DW2XbXho0xl3gGH3X0qMdl8LuS2ojml/dCdcVeCfM64t0Za4bXzCKpPg5VO 3CzB1/P/NL1pa3cmsOKu3JZ9qlkg5ZrT+Ters1ar9VHMJYr/Po8jWzypJRQOxpw3nvW5 Oq31SskWC25bMu3vDKPNgdOm19u3ihHs9vQC+lStOBsW3eDn8F+tm0y8mkpyVFDCPnEY QJuHKdNm97/IVGz9jYFlH8AYF2mDeb6u+rW2J9DF8l7jACHCP75T92PeyS07OAX4aPJE 04j5B2Y5dRbo+/PyQ0OSNSTOUk/oPgnF0GYNBP9+H9uLq7Ivx5H9qBeEGWx3Dtx57QXv SMYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=rMnm0T0fbx6mM3/oeUWLWwFcJgmrd9FCz+0R/GoOy2c=; b=vni9eKvZsxlk/m6+6/MaqDPEwkLs4g6jVqeSheABBjY4oPBWJWcIv8M3btp/GQD5Wu sR51wfBbEelnY63w8ddA1JyNlEiV4Z0QQgLQVny5boHIg1+4Z2puX8PcMNDilgVra14Q BRCTRxKEtf3m6w/eNwnKreWGllfrRh4UtldU4hWPYEb3dBDo88KJJ4Agh1PAVPR+BwrP 6mwV6upv8o8bShP5uWZUug2m0MrD1udrXR5PFZaVpAkGziteKvVzYy7elR3BfMwmbBRe uh2Z6FoX3R3IqxEXT/DhLQ9gjHJHR7tfJYhh+UYn/cGwDo7Ty1LcEDZRFeqhmMjNAYjg HPkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13-v6si22589318pgv.158.2018.06.04.18.13.33; Mon, 04 Jun 2018 18:14:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751396AbeFEBNJ (ORCPT + 99 others); Mon, 4 Jun 2018 21:13:09 -0400 Received: from exmail.andestech.com ([59.124.169.137]:21140 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbeFEBNI (ORCPT ); Mon, 4 Jun 2018 21:13:08 -0400 Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id w551DPsR010773; Tue, 5 Jun 2018 09:13:25 +0800 (GMT-8) (envelope-from alankao@andestech.com) Received: from andestech.com (10.0.1.85) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Tue, 5 Jun 2018 09:12:28 +0800 Date: Tue, 5 Jun 2018 09:12:29 +0800 From: Alan Kao To: Palmer Dabbelt CC: , , Greentime Hu , Zong Li Subject: Re: [PATCH] riscv/ftrace: Export _mcount when FUNCTION_GRAPH_TRACER isn't set Message-ID: <20180605011228.GA31803@andestech.com> References: <1525749717-384-1-git-send-email-alankao@andestech.com> <20180604203028.13886-1-palmer@sifive.com> <20180604203028.13886-2-palmer@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180604203028.13886-2-palmer@sifive.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.0.1.85] X-DNSRBL: X-MAIL: ATCSQR.andestech.com w551DPsR010773 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Palmer, Thanks for the refining work! But a small correction here: On Mon, Jun 04, 2018 at 01:30:28PM -0700, Palmer Dabbelt wrote: > 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 export was inside a CONFIG_DYNAMIC_FTRACE section instead of CONFIG_FUNCTION_GRAPH_TRACER. > The new behavior is to export _mcount whenever CONFIG_FUNCTION_TRACER is > defined. This matches what every other architecture is doing. Also, this patch is just a workaround and there are still issues in bringing up ftrace for modules. For details, please check previous emails between Steve and me. Thanks again for this better commit message. Alan Kao > > 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: > RESTORE_ABI_STATE > ret > ENDPROC(_mcount) > -EXPORT_SYMBOL(_mcount) > #endif > +EXPORT_SYMBOL(_mcount) > -- > 2.16.4 >