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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 E6693C38159 for ; Wed, 18 Jan 2023 11:09:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05B5910E1B1; Wed, 18 Jan 2023 11:09:21 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D83210E1B1 for ; Wed, 18 Jan 2023 11:09:18 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9E81D1477; Wed, 18 Jan 2023 03:10:00 -0800 (PST) Received: from [10.1.28.26] (e122027.cambridge.arm.com [10.1.28.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A60473F445; Wed, 18 Jan 2023 03:09:16 -0800 (PST) Message-ID: <18260f9c-2e2e-1210-7203-ac3b79f7da2a@arm.com> Date: Wed, 18 Jan 2023 11:09:14 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] drm/panfrost: fix GENERIC_ATOMIC64 dependency To: Arnd Bergmann , Rob Herring , Tomeu Vizoso References: <20230117164456.1591901-1-arnd@kernel.org> Content-Language: en-GB From: Steven Price In-Reply-To: <20230117164456.1591901-1-arnd@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Robin Murphy , =?UTF-8?Q?Adri=c3=a1n_Larumbe?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Alyssa Rosenzweig Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 17/01/2023 16:44, Arnd Bergmann wrote: > From: Arnd Bergmann > > On ARMv5 and earlier, a randconfig build can still run into > > WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE > Depends on [n]: IOMMU_SUPPORT [=y] && (ARM [=y] || ARM64 || COMPILE_TEST [=y]) && !GENERIC_ATOMIC64 [=y] > Selected by [y]: > - DRM_PANFROST [=y] && HAS_IOMEM [=y] && DRM [=y] && (ARM [=y] || ARM64 || COMPILE_TEST [=y] && !GENERIC_ATOMIC64 [=y]) && MMU [=y] > > Rework the dependencies to always require a working cmpxchg64. > > Fixes: db594ba3fcf9 ("drm/panfrost: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST") Looking at db594ba3fcf9 - it states: > Since panfrost has a 'select' on IOMMU_IO_PGTABLE_LPAE we must depend on > the same set of flags. Otherwise IOMMU_IO_PGTABLE_LPAE will be forced on > even though it cannot build (no support for cmpxchg64). And at the time the dependencies on IOMMU_IO_PGTABLE_LPAE were exactly these. However d286a58bc8f4 ("iommu: Tidy up io-pgtable dependencies") (currently in the iommu tree) changed the depends to split the !GENERIC_ATOMIC64 out. So we could argue that really that's the commit that should be blamed in the fixes line. However there's no harm in this being backported further than it strictly needs to be, and it's clearly better having the !GENERIC_ATOMIC64 split out. So I'll merge this to drm-misc-fixes. Reviewed-by: Steven Price Thanks! Steve > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/panfrost/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panfrost/Kconfig b/drivers/gpu/drm/panfrost/Kconfig > index 079600328be1..e6403a9d66ad 100644 > --- a/drivers/gpu/drm/panfrost/Kconfig > +++ b/drivers/gpu/drm/panfrost/Kconfig > @@ -3,7 +3,8 @@ > config DRM_PANFROST > tristate "Panfrost (DRM support for ARM Mali Midgard/Bifrost GPUs)" > depends on DRM > - depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64) > + depends on ARM || ARM64 || COMPILE_TEST > + depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE > depends on MMU > select DRM_SCHED > select IOMMU_SUPPORT