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 375F1C32793 for ; Wed, 18 Jan 2023 11:19:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1811010E719; Wed, 18 Jan 2023 11:19:11 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 0512710E718 for ; Wed, 18 Jan 2023 11:19:09 +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 E85DE1477; Wed, 18 Jan 2023 03:19:50 -0800 (PST) Received: from [10.57.77.192] (unknown [10.57.77.192]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0E7A43F445; Wed, 18 Jan 2023 03:19:06 -0800 (PST) Message-ID: <55689951-d9df-3f5e-4edc-23c86259ef2f@arm.com> Date: Wed, 18 Jan 2023 11:19:02 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] drm/panfrost: fix GENERIC_ATOMIC64 dependency Content-Language: en-GB To: Steven Price , Arnd Bergmann , Rob Herring , Tomeu Vizoso References: <20230117164456.1591901-1-arnd@kernel.org> <18260f9c-2e2e-1210-7203-ac3b79f7da2a@arm.com> From: Robin Murphy In-Reply-To: <18260f9c-2e2e-1210-7203-ac3b79f7da2a@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 , =?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 2023-01-18 11:09, Steven Price wrote: > 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. Oh bum... indeed this is entirely my fault for forgetting about our one "foreign" io-pgtable user in that commit, sorry about that. > 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. Thanks both! Robin. > > 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 >