From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 874C02DC779 for ; Thu, 20 Nov 2025 19:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763667005; cv=none; b=bHlA4yYTQiLVZwIGE2h9dGp9+FovnlvDAXVFTidyeKcyYHxGJ6VSqZFifP5dEKYxKPMTYq5CDXyoA6DTx9Ys/1Ir8yL2fJlVciwJAhyHDTS/edk7aBU1c2nslyTAxc5fdiqBg0gnrvSLwNXUFywZOxV9W8SC2peo069SfMWmipo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763667005; c=relaxed/simple; bh=Hd4/WtqVc9Aol+DR3lXzCUNvLHHImZ9L+r1mu/MYpWM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ty7BbW7ITEUX5ENgXtiAdwuoIgDdH5IyzfK1lsdarNsDw1r9reSe3w8UTH9I98RadPQW+CTroDKvSOFtwC75Ad4iKAcXFWmkhhylAQTpl3H3ZJ/wox+1rsEAwYql4t4DNwFQihs/lgYwH/OTL8reKjyZRUBSKhMBr2L0pCWJ9Jc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qur+cdua; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Qur+cdua" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B48DC4CEF1; Thu, 20 Nov 2025 19:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763667005; bh=Hd4/WtqVc9Aol+DR3lXzCUNvLHHImZ9L+r1mu/MYpWM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qur+cduaDWSWk6Jndwjpnq/XHI8eZ2FIn8B3uuBN+w4xnfousqw5Gb5jCh0f/3ESk bCc9f4OPZ9two9OTmqakiPerL7dfvzdB7W6lo/tWv/sCuFh5nyuTxV5gpF2pxyjYdd tX980r8VOQv+ZW3ezX43BA/QxxmLsesbShozAdRhIz+693qkogguDJ023xhJ77koXJ CtX9wTvilxOb9v5Md+7ic0nGOGbeP0G64hZCMsdpS5HXzxnhQxTVlmNlfg1dGDdLU9 7t/K7WdReWlhJ0SOL8n5L8xkDV3cuvkZZU6rZLosgXt2Pz7ltuyCipOmWVq8oKXAXM T9k8Qoa6BmHiQ== Date: Thu, 20 Nov 2025 19:29:59 +0000 From: Conor Dooley To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, Conor Dooley , Randy Dunlap , Jonathan Cameron , Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] arm64, lib: make ARM64 select ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION not GENERIC_CPU_CACHE_MAINTENANCE Message-ID: <20251120-ruined-liability-9ecbf53affd1@spud> References: <20251119-zippy-distinct-1e2a7da7b69b@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GWQewNjTVJ/ff2qP" Content-Disposition: inline In-Reply-To: --GWQewNjTVJ/ff2qP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 20, 2025 at 05:30:46PM +0000, Catalin Marinas wrote: > On Wed, Nov 19, 2025 at 07:08:27PM +0000, Conor Dooley wrote: > > index 09aec4a1e13f..ac223e627bc5 100644 > > --- a/lib/Kconfig > > +++ b/lib/Kconfig > > @@ -544,8 +544,9 @@ config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION > > bool > > =20 > > config GENERIC_CPU_CACHE_MAINTENANCE > > - bool > > - select ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION > > + def_bool y > > + depends on ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION > > + depends on ARM64 >=20 > That's what we do if GENERIC_CPU_CACHE_MAINTENANCE depends on some arch > code but that's not the case here. GENERIC_CPU_CACHE_MAINTENANCE is an > alternative implementation that an arch can select if it does not > provide its own. I find the current code without the above patch better. Right, I am going to leave it as-is for now then. That's both you and I (and presumably Jonathan) finding the current form more natural. Sorry Randy! >=20 > Maybe what gets confusing here is that the core code uses > ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION directly. A more involved fix > would be something like: >=20 > config CPU_CACHE_INVALIDATE_MEMREGION > def_bool y > depends on ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION || > GENERIC_CPU_CACHE_MAINTENANCE >=20 > and then go and change all the uses of > ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION. >=20 > Up to you, the current code also works for me. >=20 > --=20 > Catalin --GWQewNjTVJ/ff2qP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCaR9sNwAKCRB4tDGHoIJi 0iwAAP4sZZunWgmdbcP4niSKJ9g4EK7V7O3kaxN4Ej7sdvGNxAD6A8/QxGwRZLSe nw9K+uD+keAFW9zH8cVgWCwaWpigQwA= =PQDt -----END PGP SIGNATURE----- --GWQewNjTVJ/ff2qP--