lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] LoongArch: Fixed Loongarch LOONGSON_PCH_MSI func built errors
Date
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

Reviewed-by: Caicai <caizp2008@163.com>
Signed-off-by: Yupeng Li <liyupeng@zbhlos.com>
---
arch/loongarch/pci/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/loongarch/pci/pci.c b/arch/loongarch/pci/pci.c
index e9b7c34d9b6d..44cf57dafcdf 100644
--- a/arch/loongarch/pci/pci.c
+++ b/arch/loongarch/pci/pci.c
@@ -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;
}

--
2.34.1
\
 
 \ /
  Last update: 2022-08-19 09:27    [W:0.085 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site