Re: [PATCH 10/10] ACPI: IORT: Allow COMPILE_TEST of IORT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <jgg@xxxxxxxxxx>
---
  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.




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux