PCI: always build pci-host-common on ARM64
PATCH 1/1 PCI: always build pci-host-common on ARM64
The Thunder PCI host driver is always built, but it relies on pci_host_common_probe, so we get a link error here:
drivers/pci/host/pci-thunder-pem.c: In function 'thunder_pem_probe':drivers/pci/host/pci-thunder-pem.c:412:9: error: implicit declaration of function 'pci_host_common_probe';did you mean 'pci_host_bridge_priv'? [-Werror=implicit-function-declaration]
This adds the common file to the existing hack.
--- drivers/pci/host/Makefile | 2 +- include/linux/pci-ecam.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/pci/host/Makefile +1 -1
@@ -39,7 +39,7 @@ obj-$(CONFIG_VMD) += vmd.o # config options to be enabled, so we always build these drivers on # ARM64 and use internal ifdefs to only build the pieces we need # depending on whether ACPI, the DT driver, or both are enabled. - +obj-$(CONFIG_ARM64) += pci-host-common.o obj-$(CONFIG_ARM64) += pcie-hisi.o obj-$(CONFIG_ARM64) += pci-thunder-ecam.o obj-$(CONFIG_ARM64) += pci-thunder-pem.o
include/linux/pci-ecam.h +1 -2
@@ -68,9 +68,8 @@ extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops;/* APM X-Gene PCIe v2.x */ #endif -#ifdef CONFIG_PCI_HOST_GENERIC /* for DT-based PCI controllers that support ECAM */ int pci_host_common_probe (struct platform_device *pdev,struct pci_ecam_ops *ops); -#endif +#endif
Signature · 1 line
2.9.0
Quoted 9 lines · Arnd Bergmann
The Thunder PCI host driver is always built, but it relies on
pci_host_common_probe, so we get a link error here:
drivers/pci/host/pci-thunder-pem.c: In function 'thunder_pem_probe':drivers/pci/host/pci-thunder-pem.c:412:9: error: implicit declaration of function 'pci_host_common_probe';did you mean 'pci_host_bridge_priv'? [-Werror=implicit-function-declaration]This adds the common file to the existing hack.
Fixes ca5ab37b19df ("PCI: Explain ARM64 ACPI/MCFG quirk Kconfig and build strategy")
I'm puzzled. ca5ab37b19df doesn't *look* like it changes anything.
thunder_pem_probe() is compiled when CONFIG_PCI_HOST_THUNDER_PEM=y, and it calls pci_host_common_probe().
pci_host_common_probe() is in pci-host-common.c, which is compiled when CONFIG_PCI_HOST_COMMON=y. But the declaration below is under #ifdef CONFIG_PCI_HOST_GENERIC. Shouldn't it be under #ifdef CONFIG_PCI_HOST_COMMON instead?
It'd be nice to know what actually broke this (if it's not ca5ab37b19df) so we can figure out where the fix should be backported.
Quoted 37 lines
Signed-off-by Arnd Bergmann <[email protected]>--- drivers/pci/host/Makefile | 2 +- include/linux/pci-ecam.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)drivers/pci/host/Makefile +1
-1@@ -39,7 +39,7 @@ obj-$(CONFIG_VMD) += vmd.o # config options to be enabled, so we always build these drivers on # ARM64 and use internal ifdefs to only build the pieces we need # depending on whether ACPI, the DT driver, or both are enabled. - +obj-$(CONFIG_ARM64) += pci-host-common.o obj-$(CONFIG_ARM64) += pcie-hisi.o obj-$(CONFIG_ARM64) += pci-thunder-ecam.o obj-$(CONFIG_ARM64) += pci-thunder-pem.oinclude/linux/pci-ecam.h +1
-2@@ -68,9 +68,8 @@ extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops;/* APM X-Gene PCIe v2.x */ #endif -#ifdef CONFIG_PCI_HOST_GENERIC /* for DT-based PCI controllers that support ECAM */ int pci_host_common_probe (struct platform_device *pdev,struct pci_ecam_ops *ops); -#endif +#endif Signature · 1 line
2.9.0
Quoted 16 lines · Bjorn Helgaas
Quoted 9 lines · Arnd Bergmann
The Thunder PCI host driver is always built, but it relies on
pci_host_common_probe, so we get a link error here:
drivers/pci/host/pci-thunder-pem.c: In function 'thunder_pem_probe':drivers/pci/host/pci-thunder-pem.c:412:9: error: implicit declaration of function 'pci_host_common_probe';did you mean 'pci_host_bridge_priv'? [-Werror=implicit-function-declaration]This adds the common file to the existing hack.
Fixes ca5ab37b19df ("PCI: Explain ARM64 ACPI/MCFG quirk Kconfig and build strategy")I'm puzzled.
ca5ab37b19dfdoesn't *look* like it changes anything.
thunder_pem_probe()is compiled whenCONFIG_PCI_HOST_THUNDER_PEM=y, and it callspci_host_common_probe().
Quoted 7 lines
pci_host_common_probe()is inpci-host-common.c, which is compiled whenCONFIG_PCI_HOST_COMMON=y. But the declaration below is under #ifdefCONFIG_PCI_HOST_GENERIC. Shouldn't it be under #ifdefCONFIG_PCI_HOST_COMMONinstead?It'd be nice to know what actually broke this (if it's not
ca5ab37b19df) so we can figure out where the fix should be backported.
Right, I misread the commit and got the wrong one. I also ran into a related problem and will follow up with a new patch that addresses both at once.
Please ignore this version for now.
Arnd