From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387187; b=ME/N03TMPEi+hhBndxd/abnAyBpHg9OwEcuv+K8pfkfhdIjkcPAVQR/3X8NbIqGuWJAs E6ApZcUStRNp/tpSWWA2CC8ILjBJqquXK8IRS82MZBBY7NDv6h2mhoEYIkEmHXGqof769 J/SfH90TyX43C/5eqe6s7g/1n9KFGs7QEIUstrdX9eZi/WtTZwZwKOQ+CgcitoIdpyHAf Vtq8c0jLnn+KxowFTFS9m9PKLYwW/zhlqH6EUQfTlekVGv5fxMJtiParuY5YclRQhiI+z WsEVdUAA0Ka24RnIHjFFZ9s4926aa3IiDqNB6MG+pJAIozTleBniwnOAJNQ8Lkbpp5Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387187; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=lLiGPKZAfhAcPUc/lLseQjJo01cBUk0Y8gw2g0N2xXs=; b=bM2vvoIRjlGTxWc3k3aa2o2EnRt5EAxstz7wGXUeZNW9piKgz4Ez/PO8VKv+xkH8RVlP CzApUnERxjWMK2fXT9NJ4DecgQ/X6RLe2Z1hLo57ge0tDHuSVE99CDUo33ZpXYKUNGH0G 1gN8zml6hXrDhmLLDLzz6twWkAtWtqdKSoTA9mv8q9KH8IXZ/NXNI9qUY35v3DVNPP9EY WueMqrTzOG3w6xYjx0CAg9rGRIIhZy/3jbb9QA9dkuJjRoqRvXwoO3DXq6HwU1vj0uQgX rb8dpwg5GLpE1d5sE5U1UlEEufQmOoj95nWixFXMpwckejH2S3vKUq/wGNgbnOt7F1A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=I4oDRqWU; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8551A606A330; Fri, 4 Dec 2026 12:26:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=I4oDRqWU Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1C731F0093A; Fri, 4 Dec 2026 12:26:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387187; bh=lLiGPKZAfhAcPUc/lLseQjJo01cBUk0Y8gw2g0N2xXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=I4oDRqWUiu4cbEijoyde/37ntjDdProILToemGRSrk6Cy4VfYt/8saQR72Yzv9jBq J3mAagJUzhc2xGjR0I27yjZxiVqkpJIoN7CFbDqIZdBOicx8/vgNZpz9COiPy1Jgh8 +OiuvLE+MEG75UBocCitzZ1ocpWQeO4lC0P0S5o4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Rosen Penev , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 6.1 0138/1059] MIPS: Avoid dead code/data elimination when using recordmcount Date: Fri, 4 Dec 2026 18:54:29 +0900 Message-ID: <20261204100647.794305123@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rosen Penev [ Upstream commit 255d9dbd936f7db8b963e82429f6e57cd9d48999 ] CONFIG_LD_DEAD_CODE_DATA_ELIMINATION builds with -ffunction-sections, placing every function in its own section. recordmcount refuses to use weak symbols as section bases, as a strong definition could override them, so a weak function alone in its section, such as the generic pcibios_fixup_bus() stub, breaks the build: Cannot find symbol for section 88: .text.pcibios_fixup_bus. drivers/pci/probe.o: failed MIPS always records mcount locations with recordmcount, so this hits any config with the function tracer and dead code elimination enabled, e.g. malta_defconfig built with LLVM=1. Only offer dead code elimination when recordmcount is not used, as powerpc does since commit f8b2336f15f3 ("powerpc: Avoid dead code/data elimination when using recordmcount"). In practice this makes it unavailable together with the function tracer on MIPS. Fixes: c0436b503591 ("MIPS: Enable dead code elimination") Signed-off-by: Rosen Penev Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 585783c9907ef..3075178e28d7f 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -80,7 +80,7 @@ config MIPS select HAVE_IRQ_TIME_ACCOUNTING select HAVE_KPROBES select HAVE_KRETPROBES - select HAVE_LD_DEAD_CODE_DATA_ELIMINATION + select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !FTRACE_MCOUNT_USE_RECORDMCOUNT select HAVE_MOD_ARCH_SPECIFIC select HAVE_NMI select HAVE_PERF_EVENTS -- 2.53.0