From nobody Tue Apr 7 07:09:09 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CFCBECAAA1 for ; Tue, 30 Aug 2022 07:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbiH3H1x (ORCPT ); Tue, 30 Aug 2022 03:27:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiH3H1v (ORCPT ); Tue, 30 Aug 2022 03:27:51 -0400 X-Greylist: delayed 393 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 30 Aug 2022 00:27:50 PDT Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D2BE9E100 for ; Tue, 30 Aug 2022 00:27:50 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 5A8F55801DF; Tue, 30 Aug 2022 03:21:13 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Tue, 30 Aug 2022 03:21:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1661844073; x=1661844673; bh=26pE8ggmkg tQr3SPAdJrNTBLJZBDL+qDeHjv+0CKWZM=; b=nNx/iiMA6vIenqhBL2PaR8/yEC ug1ymFWFeyKjENRQfPsFr2yPsxz7JEwjMYKF3a2dmh5XICnN6kl9xO+zRtt+vzMB Op2BWmedtk9ruMZiwPwHgy/1XriTo9NFdWvHoefPCzmzmlbBqzxprwUkq2t97Nqa nQQsKoBzZDUUrzRyYjNWTVrBTRJvRu+m7s8dxFGKoQRvn827NLAANABDMn+A6+nP /4a4G3uqz4Ec7EsZMfoXsbh3wf9KV8ZotbGJ31o90EbtV4RmaQ+Muw4gvif5fY7i A7ndKR80XHwMz60Mndgsne9e+02zGhYRA7YoJ6gltMgQez1rXu2wsrQxmZfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= i56a14606.fm1; t=1661844073; x=1661844673; bh=26pE8ggmkgtQr3SPAd JrNTBLJZBDL+qDeHjv+0CKWZM=; b=WzjER9xPj4EIBxerPBYULbXWV5mrji80ke 4waShHmv92FoL4RHwcUekLX/TbpdRQtE/1+HPlik9x+1ApzGTsKE0rneU6nsJDpd LSpQn9oZsb6IYHTGfQqYJK2LxyuKk+M6+jSxB289c9/euzj/v3g/abTTPl+K76XV 0dM7pq3mjfpLh63ixf7M0gf2MDnQY/ZgWnTxWrB/3i5WRZzsxpLx93XEK0AMmg5M JVjR42eJDdu6y3O3iPARvoBsG4UuLLSqFkl44sHpHVtVLzeyRKMeUNlR9106KofO YxvXgMgsj77lwOy64trUeaTUgaWpWcpxB3YEfTwMkbOLsb2dIvgA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekvddguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2A3CAB60083; Tue, 30 Aug 2022 03:21:12 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-841-g7899e99a45-fm-20220811.002-g7899e99a Mime-Version: 1.0 Message-Id: <63a630b7-9068-40f9-b7f7-d9a08f74ed13@www.fastmail.com> In-Reply-To: References: <20220818145616.3156379-1-arnd@kernel.org> <20220818145616.3156379-5-arnd@kernel.org> Date: Tue, 30 Aug 2022 09:20:51 +0200 From: "Arnd Bergmann" To: "Arnd Bergmann" , "Linus Walleij" Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Russell King" , "Geert Uytterhoeven" , "Krzysztof Kozlowski" , "Ard Biesheuvel" , "Sekhar Nori" , "Bartosz Golaszewski" , "Shawn Guo" , "Sascha Hauer" , "Pengutronix Kernel Team" , "Andrew Lunn" , "Gregory Clement" , "Sebastian Hesselbarth" Subject: [PATCH] ARM: fix XIP_KERNEL dependencies Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" CONFIG_XIP_KERNEL does not work with any option that involves patching the read-only kernel .text. Since at least CONFIG_SMP_ON_UP is required in certain configurations, flip the dependency to always allow the .text patching options but make XIP_KERNEL have the dependency instead. This is a prerequisite for allowing CONFIG_ARCH_MULTIPLATFORM to be disabled. Signed-off-by: Arnd Bergmann Reviewed-by: Geert Uytterhoeven Reviewed-by: Linus Walleij --- forgot to send this yesterday, replaces the CPU_v6 dependency patch diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3066ce82cffc..2d94e53037ec 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -246,7 +246,7 @@ config ARCH_MTD_XIP config ARM_PATCH_PHYS_VIRT bool "Patch physical to virtual translations at runtime" if EMBEDDED default y - depends on !XIP_KERNEL && MMU + depends on MMU help Patch phys-to-virt and virt-to-phys translation functions at boot and module load time according to the position of the @@ -975,7 +975,7 @@ config SMP =20 config SMP_ON_UP bool "Allow booting SMP kernel on uniprocessor systems" - depends on SMP && !XIP_KERNEL && MMU + depends on SMP && MMU default y help SMP kernels contain instructions which fail on non-SMP processors. @@ -1224,7 +1224,7 @@ config THUMB2_KERNEL =20 config ARM_PATCH_IDIV bool "Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()" - depends on CPU_32v7 && !XIP_KERNEL + depends on CPU_32v7 default y help The ARM compiler inserts calls to __aeabi_idiv() and @@ -1619,6 +1619,7 @@ endchoice config XIP_KERNEL bool "Kernel Execute-In-Place from ROM" depends on !ARM_LPAE && !ARCH_MULTIPLATFORM + depends on !SMP_ON_UP && !ARM_PATCH_IDIV && !ARM_PATCH_PHYS_VIRT help Execute-In-Place allows the kernel to run from non-volatile storage directly addressable by the CPU, such as NOR flash. This saves RAM