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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B7F10C4167B for ; Thu, 30 Nov 2023 14:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pDwD8pm96iPdt6BP9MCja4KlIgvorkRBOGy1Ebw8Sik=; b=kT+l8JPL5yac64 AfZilJ4n8AeG7K32XRubHQSqoJt+r9NOfem5WKrpl5AwbExTtLWJ1uwj79Ef2FGjNgi9c/ZGWUOGX 7l6fd/NMWj2k8Jqujf9/vavna7OP2hR1Gf1IWT7FSwBf2Kyni2mUDGV2byz7W/dGgeiL6096M0mRu hI2mJr9KuofYkVM60R4OdUQyOcThgZ3Dan/PaJva3v464eZ6UzAHQEEYIAORd0w4pOWlSXh5mHWCH +9bzPqEUbvv0xm89BAvIfNSN7paPSRs8l7VWqd6iVme4Dyq+hTPzR0GqS9d590vzhINtmMHI8qQH/ cuNVOCaumvArnQ0EZi/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8hku-00B48L-2W; Thu, 30 Nov 2023 14:11:04 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8hkq-00B44r-0T; Thu, 30 Nov 2023 14:11:01 +0000 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 168201042; Thu, 30 Nov 2023 06:11:43 -0800 (PST) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 107D53F5A1; Thu, 30 Nov 2023 06:10:49 -0800 (PST) Message-ID: <2e0f0aac-6287-45d1-ae96-6549c15a8418@arm.com> Date: Thu, 30 Nov 2023 14:10:48 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/10] ACPI: IORT: Allow COMPILE_TEST of IORT Content-Language: en-GB To: Jason Gunthorpe , David Airlie , Alyssa Rosenzweig , Albert Ou , asahi@lists.linux.dev, Catalin Marinas , Danilo Krummrich , Daniel Vetter , Dexuan Cui , devicetree@vger.kernel.org, dmaengine@vger.kernel.org, dri-devel@lists.freedesktop.org, David Woodhouse , Frank Rowand , Hanjun Guo , Haiyang Zhang , iommu@lists.linux.dev, Jon Hunter , Joerg Roedel , Karol Herbst , Krzysztof Kozlowski , "K. Y. Srinivasan" , Laxman Dewangan , Len Brown , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-snps-arc@lists.infradead.org, linux-tegra@vger.kernel.org, Russell King , Lorenzo Pieralisi , Lyude Paul , Marek Szyprowski , nouveau@lists.freedesktop.org, Palmer Dabbelt , Paul Walmsley , "Rafael J. Wysocki" , Rob Herring , Sudeep Holla , Suravee Suthikulpanit , Sven Peter , Thomas Bogendoerfer , Vineet Gupta , Vinod Koul , Wei Liu , Will Deacon Cc: Lu Baolu , Christoph Hellwig , Jerry Snitselaar , Hector Martin , Moritz Fischer , patches@lists.linux.dev, "Rafael J. Wysocki" , Rob Herring , Thierry Reding References: <10-v1-720585788a7d+811b-iommu_fwspec_p1_jgg@nvidia.com> From: Robin Murphy In-Reply-To: <10-v1-720585788a7d+811b-iommu_fwspec_p1_jgg@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231130_061100_277828_C4AA3F66 X-CRM114-Status: GOOD ( 20.65 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On 29/11/2023 12:48 am, Jason Gunthorpe wrote: > The arm-smmu driver can COMPILE_TEST on x86, so expand this to also > enable the IORT code so it can be COMPILE_TEST'd too. > > Signed-off-by: Jason Gunthorpe > --- > drivers/acpi/Kconfig | 2 -- > drivers/acpi/Makefile | 2 +- > drivers/acpi/arm64/Kconfig | 1 + > drivers/acpi/arm64/Makefile | 2 +- > drivers/iommu/Kconfig | 1 + > 5 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index f819e760ff195a..3b7f77b227d13a 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -541,9 +541,7 @@ config ACPI_PFRUT > To compile the drivers as modules, choose M here: > the modules will be called pfr_update and pfr_telemetry. > > -if ARM64 > source "drivers/acpi/arm64/Kconfig" > -endif > > config ACPI_PPTT > bool > diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile > index eaa09bf52f1760..4e77ae37b80726 100644 > --- a/drivers/acpi/Makefile > +++ b/drivers/acpi/Makefile > @@ -127,7 +127,7 @@ obj-y += pmic/ > video-objs += acpi_video.o video_detect.o > obj-y += dptf/ > > -obj-$(CONFIG_ARM64) += arm64/ > +obj-y += arm64/ > > obj-$(CONFIG_ACPI_VIOT) += viot.o > > diff --git a/drivers/acpi/arm64/Kconfig b/drivers/acpi/arm64/Kconfig > index b3ed6212244c1e..537d49d8ace69e 100644 > --- a/drivers/acpi/arm64/Kconfig > +++ b/drivers/acpi/arm64/Kconfig > @@ -11,6 +11,7 @@ config ACPI_GTDT > > config ACPI_AGDI > bool "Arm Generic Diagnostic Dump and Reset Device Interface" > + depends on ARM64 > depends on ARM_SDE_INTERFACE > help > Arm Generic Diagnostic Dump and Reset Device Interface (AGDI) is > diff --git a/drivers/acpi/arm64/Makefile b/drivers/acpi/arm64/Makefile > index 143debc1ba4a9d..71d0e635599390 100644 > --- a/drivers/acpi/arm64/Makefile > +++ b/drivers/acpi/arm64/Makefile > @@ -4,4 +4,4 @@ obj-$(CONFIG_ACPI_IORT) += iort.o > obj-$(CONFIG_ACPI_GTDT) += gtdt.o > obj-$(CONFIG_ACPI_APMT) += apmt.o > obj-$(CONFIG_ARM_AMBA) += amba.o > -obj-y += dma.o init.o > +obj-$(CONFIG_ARM64) += dma.o init.o > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > index 7673bb82945b6c..309378e76a9bc9 100644 > --- a/drivers/iommu/Kconfig > +++ b/drivers/iommu/Kconfig > @@ -318,6 +318,7 @@ config ARM_SMMU > select IOMMU_API > select IOMMU_IO_PGTABLE_LPAE > select ARM_DMA_USE_IOMMU if ARM > + select ACPI_IORT if ACPI This is incomplete. If you want the driver to be responsible for enabling its own probing mechanisms then you need to select OF and ACPI too. And all the other drivers which probe from IORT should surely also select ACPI_IORT, and thus ACPI as well. And maybe the PCI core should as well because there are general properties of PCI host bridges and devices described in there? But of course that's clearly backwards nonsense, because drivers do not and should not do that, so this change is not appropriate either. The IORT code may not be *functionally* arm64-specific, but logically it very much is - it serves a specification which is tied to the Arm architecture and describes Arm-architecture-specific concepts, within the wider context of ACPI on Arm itself only supporting AArch64, and not AArch32. It's also not like it's driver code that someone might use as an example and copy to a similar driver which could then run on different architectures where a latent theoretical bug becomes real. There's really no practical value to be had from compile-testing IORT. Thanks, Robin. _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc