From patchwork Tue Aug 30 07:20:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12958860 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 A5B3CECAAD8 for ; Tue, 30 Aug 2022 07:22:44 +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:Subject:Cc:To:From:Date:References: In-Reply-To:Message-Id:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cOVNASb4ksjmigKvZ68/sp0VpXiPTIvrFBWtYLRRJEI=; b=ptbJqEH6TupvEG a0KyX7RA9EMgAkNghQOR5zx0DVBd4p1oUJb5DkYyf2WPqoLJIp0RRmjowZPBBWJQ3HIbAGRfmUaJl j5HJZbYKTCV5z4nuxrBal8e9ZZRRa8NjD1X6fXHV2Igvg0qloaRp5ufyLU1pefkMhc8ZG9um6p0wO qwfbY5yaLna+bZ1nMaSlb97LWV23uVWfeFdxnhAfAPTfZrZ6xn/rvXbojudSzg83rSRIO0bWgi+q4 CRv7ed2A9z5uiJ4rW2y1cJhndrLWvzNKSsuguYBftj2EYXLfadxQvdqmWFfrOa2Fbpj02cy0jnWIZ NlrV1uCkFPiAOqPEKz3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSvYp-00Eje6-Pp; Tue, 30 Aug 2022 07:21:24 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSvYl-00EjZq-EH for linux-arm-kernel@lists.infradead.org; Tue, 30 Aug 2022 07:21:21 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220830_002119_931485_0AE7FE5D X-CRM114-Status: GOOD ( 10.90 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 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 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