From mboxrd@z Thu Jan 1 00:00:00 1970 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 5C824C38147 for ; Wed, 18 Jan 2023 12:01:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbjARMBi (ORCPT ); Wed, 18 Jan 2023 07:01:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjARMBJ (ORCPT ); Wed, 18 Jan 2023 07:01:09 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70DED9D288 for ; Wed, 18 Jan 2023 03:19:09 -0800 (PST) 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 Cc: Arnd Bergmann , Alyssa Rosenzweig , David Airlie , Daniel Vetter , =?UTF-8?Q?Adri=c3=a1n_Larumbe?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >