From patchwork Wed May 10 10:18:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Song Shuai X-Patchwork-Id: 13236725 X-Patchwork-Delegate: palmer@dabbelt.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0164C7EE26 for ; Wed, 10 May 2023 10:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Bkt/XsVebbsnIcN2tUCRaRHaZMWlSzUm4F9AAZC/edM=; b=cpyoKKeHaPXPqq /wDpa83xq8Y/AipldNW1mhPRvZsqZpIa5TvAm5cM05jW74EKcGQNuq5Xzkn+AZdP054J9jksbda3C NXxEKegRZ9+8Emb7hmn1DJm7eCA0ZNk5+ami26yEGOgKs1/NmvQ9tqowqh7Xwi6/kIK7Y8i/hsotn DlRDNuDGk89mqyp8YfpgHzzFs6xTzgMyyKkd4vbRU96igu6gb07r8lk4m/7erT9hO+5g1KoN/A/aN Manoh4r0TYrItC1dWgFUE5w4CtPboSWyo2WJwDiTftzJeCctKlDrQXBuNUPR+P1hAzZN+luHkvIIE OPA0I2+fSXmxOmDyUz/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pwgus-005kGu-29; Wed, 10 May 2023 10:19:26 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pwguq-005kFp-26 for linux-riscv@lists.infradead.org; Wed, 10 May 2023 10:19:25 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1aafa03f541so68594325ad.0 for ; Wed, 10 May 2023 03:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683713961; x=1686305961; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z1t0ft/AfuKy/xQMa6et8iuTG4wcZxNYRj+6RIhEHQg=; b=QIn7qQyGu9KHA02ujG7t9C/xbo/Tw2O/IeCeYI61VMn9+jgbUaZbg1NtaoLSGqn1Ok Xe90gJ+r3SRKeS34/7oOM6jvIbWyhjhQ/TvzKX6rIy9BTF3CMXtkrrWy8ohl+giADPhq N/uoad4SmyQsBNdlpRe+/e+PFgXOvrjakYFTyPhROB+6YkVl1Jyd8sllHP1QeKv2Q9nD K/19jMnBenBArM/nj0/uPipZfqw5hvKKQZGLnpG5m07w8IEpB2hOqFPpc27RAxFlAgbJ H55faVr/w8momTJ96c0CYKQ74gDk+ttrdT+UYy6xk3yNrVyIkQpf9tAG9gFUZ8c8hv4Z cPrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683713961; x=1686305961; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z1t0ft/AfuKy/xQMa6et8iuTG4wcZxNYRj+6RIhEHQg=; b=Ysk6G9D30eXTCsLMJUeM5+Ri4nghs3l5pDIF/WF8izTcziqKe4Z4DHmm+h0y2rjXqE Heyd9HcXfSoRR68JxvQM1KBW5bNNbHXshSGZ9mcb4tSAUCvmHvdmUZPFCMNwtoaZM6E/ n/6Piha16BCLttVR1lYz0PPFoEQjLhB1uISZMylO2qurNxo0hK68ts+if1l7irmod8UC UxGvypCe5v8uSFjXiDDzHFLPK25aLApH3nmlUz7kvTya1QDG0DZIZEcDo/hpiyCEaYyf C8cj9zyFbuMQaaDXx+BI7JEAXxAYb4ayJnU1k9xMzOs9SuV000wMSDad5f64ZiJn/Z7Z DqSA== X-Gm-Message-State: AC+VfDx/HbSjIR15v7PNwwrQldn+SDLRnTOeNiTxtmxiD0wiLRDPBWNo Urm8jxJinkuQftmwTyI4TiA= X-Google-Smtp-Source: ACHHUZ67FWUbYYJrDsy2nIlpJYZhkPsodT3ItqoRkKPrzKQ+qLZzU8rxzk62MZG7RanBjvpefi6vIA== X-Received: by 2002:a17:902:d3c6:b0:1a9:7e44:17 with SMTP id w6-20020a170902d3c600b001a97e440017mr15067440plb.17.1683713961643; Wed, 10 May 2023 03:19:21 -0700 (PDT) Received: from localhost.localdomain ([221.226.144.218]) by smtp.gmail.com with ESMTPSA id p16-20020a170902e75000b001aadd0d7364sm3393419plf.83.2023.05.10.03.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 03:19:21 -0700 (PDT) From: Song Shuai To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, rostedt@goodmis.org, mhiramat@kernel.org, mark.rutland@arm.com, guoren@kernel.org, suagrfillet@gmail.com, jszhang@kernel.org, e.shatokhin@yadro.com Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= Subject: [PATCH V9 1/4] riscv: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY Date: Wed, 10 May 2023 18:18:54 +0800 Message-Id: <20230510101857.2953955-2-suagrfillet@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230510101857.2953955-1-suagrfillet@gmail.com> References: <20230510101857.2953955-1-suagrfillet@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230510_031924_691182_C7C7B059 X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org In RISC-V, -fpatchable-function-entry option is used to support dynamic ftrace in this commit afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT"). So recordmcount don't have to be called to create the __mcount_loc section before the vmlinux linking. Here selects FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY to tell Makefile not to run recordmcount. Link: https://lore.kernel.org/linux-riscv/CAAYs2=j3Eak9vU6xbAw0zPuoh00rh8v5C2U3fePkokZFibWs2g@mail.gmail.com/T/#t Link: https://lore.kernel.org/linux-riscv/Y4jtfrJt+%2FQ5nMOz@spud/ Signed-off-by: Song Shuai Tested-by: Guo Ren Signed-off-by: Guo Ren Acked-by: Björn Töpel --- arch/riscv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 348c0fa1fc8c..e0632493482f 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -58,6 +58,7 @@ config RISCV select COMMON_CLK select CPU_PM if CPU_IDLE || HIBERNATION select EDAC_SUPPORT + select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE select GENERIC_ARCH_TOPOLOGY select GENERIC_ATOMIC64 if !64BIT select GENERIC_CLOCKEVENTS_BROADCAST if SMP