[PATCH] PCI: apple: Add depends on PAGE_SIZE_16KB
From: Alyssa Rosenzweig
Date: Tue Feb 11 2025 - 13:04:16 EST
From: Janne Grunau <j@xxxxxxxxxx>
The iommu on Apple's M1 and M2 supports only a page size of 16kB and is
mandatory for PCIe devices. Mismatched page sizes will render devices
useless due to non-working DMA. While the iommu prints a warning in this
scenario, it seems a common and hard to debug problem, so prevent it at
build-time.
Signed-off-by: Janne Grunau <j@xxxxxxxxxx>
Signed-off-by: Alyssa Rosenzweig <alyssa@xxxxxxxxxxxxx>
---
drivers/pci/controller/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 9800b768105402d6dd1ba4b134c2ec23da6e4201..507e6ac5d65257578e4eec74b459f6605c9c2907 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -39,6 +39,7 @@ config PCIE_APPLE
depends on ARCH_APPLE || COMPILE_TEST
depends on OF
depends on PCI_MSI
+ depends on PAGE_SIZE_16KB || COMPILE_TEST
select PCI_HOST_COMMON
help
Say Y here if you want to enable PCIe controller support on Apple
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20250211-pci-16k-4c391a5dcd18
Best regards,
--
Alyssa Rosenzweig <alyssa@xxxxxxxxxxxxx>