Skip to contentSkip to conversation

LoongArch: Fixed Loongarch LOONGSON_PCH_MSI func built errors

PATCH In review Yupeng Li 1 participant 1 message Aug 19, 2022 LoongArch

lore
Share & tools
lore

Yupeng Li

author
#0 lore raw

PATCH 2/2 LoongArch: Fixed Loongarch LOONGSON_PCH_MSI func built errors

When CONFIG_LOONGSON_PCH_MSI was disabled,kernel build with errors like:

MODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN modules.builtin
LD .tmp_vmlinux.kallsyms1
loongarch64-linux-gnu-ld: arch/loongarch/pci/pci.o: in function `pcibios_device_add':
pci.c:(.text+0x1b8): undefined reference to `get_pch_msi_handle'
make: *** [Makefile:1171:vmlinux] 错误 1

---
 arch/loongarch/pci/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/loongarch/pci/pci.c +2 -1
index e9b7c34d9b6d..44cf57dafcdf 100644
@@ -65,13 +65,14 @@ subsys_initcall(pcibios_init);
 
 int pcibios_device_add(struct pci_dev *dev)
 {
+#ifdef CONFIG_LOONGSON_PCH_MSI
 	int id;
 	struct irq_domain *dom;
 
 	id = pci_domain_nr(dev->bus);
 	dom = irq_find_matching_fwnode(get_pch_msi_handle(id), DOMAIN_BUS_PCI_MSI);
 	dev_set_msi_domain(&dev->dev, dom);
-
+#endif
 	return 0;
 }
 
Signature · 1 line
2.34.1