From patchwork Wed Aug 23 08:28:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 13361801 X-Patchwork-Delegate: mail@conchuod.ie 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 11C37EE4993 for ; Wed, 23 Aug 2023 08:29:04 +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: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:In-Reply-To:References: List-Owner; bh=E3QYbsSyIOxsnhktjEqw8b2YeQ8WJw7tpXZ85KQmyrk=; b=iqitiPW9+mlpRo H/8XMMy9tfGsMR6BPh0t5pewCVQtkNyw4PfE4Q+MZGN5E1Qrf+K5GL7TKukDR+fCkhqlsHhapqV6X H3MCODpO4wC/KDLMBxNwPci+DWMbnBgvOhwwbamcWANvPMq2TufjehbHRx438MEhk7zdgQIMswOLh j4k7JrIxNfJ2GVQyf3DqSuLDRgbeRgsnnE7tcx9jIqMgj5Wv5pm4kDGWd+VUDRqAncYGp96Fggrls X68/f0W9cThtm2ehCF5OkMgrmIrxXDCWRoLTmaBgeyZjZ6gjOJuiFNXL6sUBbvF0B9Njmpy5FTOHy xefQuMfFNMo3q16Bjp8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYjEX-00HYzP-2B; Wed, 23 Aug 2023 08:28:57 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYjEV-00HYyY-0L for linux-riscv@lists.infradead.org; Wed, 23 Aug 2023 08:28:56 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 356716162C; Wed, 23 Aug 2023 08:28:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EA90C433C7; Wed, 23 Aug 2023 08:28:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692779333; bh=sgE48NtgP4eQen2ml46+iGXN2pZhCvwsUI3qxh709IA=; h=From:To:Cc:Subject:Date:From; b=B8XeCEiyNqSPMfc/NUpIMPqso5AROFao4byCojwbb5El1u6vSLFULDLvh/AQ9J9TP xYC4h2NCGDg1FNfUwHHbeRWhOJooIm4+18XN/Zy4G43BH0sr6vXTenjM5wA8rE7Imt fXncqCcjvg9fhu8gG9hy/3DATr+TuHwLPfzJxmsMishCx3lHyZuu/G7OjN1kAw1EHE I+nfxzy/zZ88AweOIeQHsgntA6vUTPBFDsyDnlsAs8aKjWUWAs9Btg8oLiuiahMdG5 cqMPbl0IfTurajBVvnWCCPWMFxx/8xrF99N9+NeOfPI7T3Ewe0NH9TNfwt2yCS2bJs PBxkutaUE1+BA== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Randy Dunlap Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , linux-kernel@vger.kernel.org, Guo Ren , Drew Fustini , linux-next@vger.kernel.org, Stephen Rothwell Subject: [PATCH] riscv: Require FRAME_POINTER for some configurations Date: Wed, 23 Aug 2023 10:28:45 +0200 Message-Id: <20230823082845.354839-1-bjorn@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230823_012855_189197_74ACE24D X-CRM114-Status: GOOD ( 10.48 ) 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 From: Björn Töpel Some V configurations implicitly turn on '-fno-omit-frame-pointer', but leaving FRAME_POINTER disabled. This makes it hard to reason about the FRAME_POINTER config, and also triggers build failures introduced in by the commit in the Fixes: tag. Select FRAME_POINTER explicitly for these configurations. Fixes: ebc9cb03b21e ("riscv: stack: Fixup independent softirq stack for CONFIG_FRAME_POINTER=n") Signed-off-by: Björn Töpel Tested-by: Randy Dunlap Acked-by: Randy Dunlap Reviewed-by: Conor Dooley --- arch/riscv/Kconfig | 1 + arch/riscv/Makefile | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) base-commit: 89bf6209cad66214d3774dac86b6bbf2aec6a30d diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 10e7a7ad175a..cd8075c092c3 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -62,6 +62,7 @@ config RISCV select COMMON_CLK select CPU_PM if CPU_IDLE || HIBERNATION select EDAC_SUPPORT + select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE) select GENERIC_ARCH_TOPOLOGY select GENERIC_ATOMIC64 if !64BIT select GENERIC_CLOCKEVENTS_BROADCAST if SMP diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index 6ec6d52a4180..1329e060c548 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -87,9 +87,6 @@ endif ifeq ($(CONFIG_CMODEL_MEDANY),y) KBUILD_CFLAGS += -mcmodel=medany endif -ifeq ($(CONFIG_PERF_EVENTS),y) - KBUILD_CFLAGS += -fno-omit-frame-pointer -endif # Avoid generating .eh_frame sections. KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables