Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5767331pxu; Wed, 23 Dec 2020 05:08:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4ZH3CpYRiS6GaNpvguwIHetRBqp6hN0/ciN/VGxfwz0zPKQKJsB6n9JmFwblHqh+Gj9xE X-Received: by 2002:a17:906:68d1:: with SMTP id y17mr24145650ejr.447.1608728912504; Wed, 23 Dec 2020 05:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608728912; cv=none; d=google.com; s=arc-20160816; b=xnUVRc9L0ra9pzymQDSuPirVy+yFUP9qeL63hxAkEWD2JDinL/E+EEc09V28GqIxZK 2M8p5W3WGoIcaPogJLIxM+ZNcgPkNM5Mfmbxd0TYoxqr7zIoPt/BTUwh37jiFBFnVZi6 MkaJOoTNf5Z0SkDS3BLAh8AwQmB1x23xKMlIUEzWhdAFWOLvH979wQ8D8Xfav3xheIvH 4tS/HJs0JlV6NRbGWf99vlZNqum8mLHgDUjjyssDtzoPUKujNLcbPECRu4MXsUElZu69 yZ2/FFjIS8NS4A26/Z0tdtw2K7aWkvzNQ+QMtAQus6X7wRchVDqY3jA0uZJ+5F2rn0k7 DB3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=JrN+8DPI5sippwgQGY41GzOmFG0HXMLjIT1bFNzS7GY=; b=dEyK+tRNw+epzkZThfA6OI6/FCZiSAa4Vr/g2NYD64auXggPVhJT0TNB0X3SsIZJGt QNbB14nz7SI9OHUza70fsoxQyR4GzE1vEuRL66cD4bF4FhUysm58MpqRPOm+7mvjaqr2 3etf5Xo1x1CNskwUK/U5OlG8qSxku6k305208xxgfS9r7r/ap4VBeIayeBD6L3kngdmd mWOlTbtftVz5nfm5p+O5Bm9ZXWmcCyLN1cb8SnLqoJiew40Wf3ZUd71m5yPAcw5Z40eL ZoFJnIJLNwKV5OGMjFRXb5MMcIHNeU9KaFnLsPJuQ3AHeaqDBKsB05qForMqqcfZKtqB g8GQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si8212252ejb.78.2020.12.23.05.08.09; Wed, 23 Dec 2020 05:08:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728705AbgLWNGQ (ORCPT + 99 others); Wed, 23 Dec 2020 08:06:16 -0500 Received: from foss.arm.com ([217.140.110.172]:49954 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728649AbgLWNGQ (ORCPT ); Wed, 23 Dec 2020 08:06:16 -0500 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 5D5B330E; Wed, 23 Dec 2020 05:05:30 -0800 (PST) Received: from [10.57.34.90] (unknown [10.57.34.90]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7B1333F66E; Wed, 23 Dec 2020 05:05:28 -0800 (PST) Subject: Re: [PATCH v2 3/7] iommu/arm-smmu: Add dependency on io-pgtable format modules To: isaacm@codeaurora.org Cc: iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, pratikp@codeaurora.org, joro@8bytes.org, kernel-team@android.com, will@kernel.org, pdaly@codeaurora.org References: <1608597876-32367-1-git-send-email-isaacm@codeaurora.org> <1608597876-32367-4-git-send-email-isaacm@codeaurora.org> <3b0c191d-3fd0-73db-c1e3-4a80aa7953d7@arm.com> From: Robin Murphy Message-ID: Date: Wed, 23 Dec 2020 13:05:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-12-22 19:49, isaacm@codeaurora.org wrote: > On 2020-12-22 11:27, Robin Murphy wrote: >> On 2020-12-22 00:44, Isaac J. Manjarres wrote: >>> The SMMU driver depends on the availability of the ARM LPAE and >>> ARM V7S io-pgtable format code to work properly. In preparation >> >> Nit: we don't really depend on v7s - we *can* use it if it's >> available, address constraints are suitable, and the SMMU >> implementation actually supports it (many don't), but we can still >> quite happily not use it even so. LPAE is mandatory in the >> architecture so that's our only hard requirement, embodied in the >> kconfig select. >> >> This does mean there may technically still be a corner case involving >> ARM_SMMU=y and IO_PGTABLE_ARM_V7S=m, but at worst it's now a runtime >> failure rather than a build error, so unless and until anyone >> demonstrates that it actually matters I don't feel particularly >> inclined to give it much thought. >> >> Robin. >> > Okay, I'll fix up the commit message, as well as the code, so that it > only depends on io-pgtable-arm. Well, IIUC it would make sense to keep the softdep for when the v7s module *is* present; I just wanted to clarify that it's more of a nice-to-have rather than a necessity. Robin. > Thanks, > Isaac >>> for having the io-pgtable formats as modules, add a "pre" >>> dependency with MODULE_SOFTDEP() to ensure that the io-pgtable >>> format modules are loaded before loading the ARM SMMU driver module. >>> >>> Signed-off-by: Isaac J. Manjarres >>> --- >>>   drivers/iommu/arm/arm-smmu/arm-smmu.c | 1 + >>>   1 file changed, 1 insertion(+) >>> >>> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c >>> b/drivers/iommu/arm/arm-smmu/arm-smmu.c >>> index d8c6bfd..a72649f 100644 >>> --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c >>> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c >>> @@ -2351,3 +2351,4 @@ MODULE_DESCRIPTION("IOMMU API for ARM >>> architected SMMU implementations"); >>>   MODULE_AUTHOR("Will Deacon "); >>>   MODULE_ALIAS("platform:arm-smmu"); >>>   MODULE_LICENSE("GPL v2"); >>> +MODULE_SOFTDEP("pre: io-pgtable-arm io-pgtable-arm-v7s"); >>> >> >> _______________________________________________ >> linux-arm-kernel mailing list >> linux-arm-kernel@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel