Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp87786imm; Mon, 4 Jun 2018 13:32:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIqkUhxiOlB5vWtOUq2D2x04KHQZqlIS/9Bx9i0spvv9ZnOG3yIOppfX/lHDHDWdbAuoNwZ X-Received: by 2002:a63:91c8:: with SMTP id l191-v6mr18522610pge.53.1528144372468; Mon, 04 Jun 2018 13:32:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528144372; cv=none; d=google.com; s=arc-20160816; b=lUCVwvQ0eCuu0s4S+FpPOxAj9RCF63MYq2/N/d6rJdq13WDY3wCwHrc2WvVFErDN0L PsY1YsHHpn0YOkAqAJHw+YtJDNx9bqRaWuCPqRPvvynrGq9iDUNCGfY8T+RjwXP44qvR s7f8L+6wSt555DIT0pQljlokq0H4VD7LFY4xi/8iv/M9yLjA9I8M4eqYqV4JVWnEhCWn gZYDs1c65WnUBlO8mk+UNV5+cqvgfjfbR3V48fsKhmP07zQiKvoiVjGNmoFP3HJt7jGy VZRrzzKgnK4420SZbpdd82twTS0d3xfUca7yUL2sSEJ2GNLPUJJ10xf2wSITA+RI5c3d s8iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:from:cc:references:in-reply-to :message-id:date:subject:dkim-signature:arc-authentication-results; bh=XSn5aW3eLRFsbp0+BrQ+1EwHbkMVQoMcslaD0BPfBcY=; b=iH6Mi6jvZHhBd/P9TCCenLW3a9ZGcKmkhGbwNq/nAmvJgrFpAxm6tJFt7exG5U9N+h Y5rAVt35ylxJdmPemCOU3iZ6f7/cgGklAfkI6OcO2vWXWuLa+UULWlcBLR5YXiotg2x3 vOtobvxMadjnfEbY6HTg73lPIdNa5Tm4PIbEVX7gtwMTfbGmvdhm5Lf7euQrT82audDe tKZdA1rgABolG/X6XQRGaRByghVnRDZkUwix5Uvg3scAxZuO61MuF41jnKcvLpDkAMGN YWUwQgGmfLa5rkzlLwaU7sOqMKHdZpoyIp1ksSI2HSNAMwe8qVnqGW85OeoTnm78J9+h MpSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=TirHIume; 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 p12-v6si12083246pfd.76.2018.06.04.13.32.34; Mon, 04 Jun 2018 13:32:52 -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; dkim=pass header.i=@sifive.com header.s=google header.b=TirHIume; 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 S1751492AbeFDUb1 (ORCPT + 99 others); Mon, 4 Jun 2018 16:31:27 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:44770 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbeFDUaq (ORCPT ); Mon, 4 Jun 2018 16:30:46 -0400 Received: by mail-pf0-f195.google.com with SMTP id h12-v6so6656588pfk.11 for ; Mon, 04 Jun 2018 13:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:date:message-id:in-reply-to:references:cc:from:to; bh=XSn5aW3eLRFsbp0+BrQ+1EwHbkMVQoMcslaD0BPfBcY=; b=TirHIumeXmElzLY8ok78CZOQwOmAbo6jVK+emZx+NGp+wbJfmizC1tPSqoGAi21f1s XZ/yUrgOfM3Ys5xgzMg8O3FvUF8Ogv8W2IcIE0/eCaIWgFUeWK+f+9b58qP0zDhA6os6 qr5X2ReN8hnBEeOapb+Cwbcpftnr2w+/o8SjWDxjUdI5S6yZb1dNlp/vd7O2aJunYpdj wIRfCF12rDNmmBVfhhBjHr0N+OxgmUNZnTQnE0pCQlTqu9rkU/u7TTbSMkRwP6nuA76i AbXRBqyX25gAoDdEqwZ7Y+92ha4aEXk5cNE8VCKvchdLXzztaEgisSzMxMnt0Wq9j4ay kasg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :cc:from:to; bh=XSn5aW3eLRFsbp0+BrQ+1EwHbkMVQoMcslaD0BPfBcY=; b=CBAG6Z9Lo30fT6VOKQtYebGqp0tAPkBi3izV7mwvNePDkcOCcumixXAg9aFytY4jAF ICMAu7SSinZH+PNFRvqrRc54Tyi6xFb8IpGqeduZZ6aITIAlvCD6htbrvC3gh2jCh6n/ 9XuEAiFzXAijm5mA0dNnivfsAoGihr2upz/imMWhhL/nMrShekfyq1ODKCT/oX0OjU45 oAlwitsyrisSUk7DhChV5Q0A3zp83BEe7b5sPrwVomqvjYR/zoBuyb0wtNzmZ3gGQfO+ eNOgKohX6YmW2jyjO8bPF2NCRc3BbANbBFBzTyJKWJvI9aKiviX1RR9ITSFEIsHLgV4T NNvQ== X-Gm-Message-State: ALKqPwcKcmOkxptENZHhl8CKXSl85BmMUlJYT2Wdah5TjTIQON9LJVUF sNs9fofOFZB/y3OwplqqsWoCln+EBiY= X-Received: by 2002:a63:448:: with SMTP id 69-v6mr17740449pge.395.1528144245712; Mon, 04 Jun 2018 13:30:45 -0700 (PDT) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id c74-v6sm9881259pfd.19.2018.06.04.13.30.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 13:30:45 -0700 (PDT) Subject: [PATCH] riscv/ftrace: Export _mcount when FUNCTION_GRAPH_TRACER isn't set Date: Mon, 4 Jun 2018 13:30:28 -0700 Message-Id: <20180604203028.13886-2-palmer@sifive.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180604203028.13886-1-palmer@sifive.com> References: <1525749717-384-1-git-send-email-alankao@andestech.com> <20180604203028.13886-1-palmer@sifive.com> Cc: linux-kernel@vger.kernel.org, Greentime Hu , Zong Li , Palmer Dabbelt From: Palmer Dabbelt To: alankao@andestech.com, linux-riscv@lists.infradead.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: RESTORE_ABI_STATE ret ENDPROC(_mcount) -EXPORT_SYMBOL(_mcount) #endif +EXPORT_SYMBOL(_mcount) -- 2.16.4