[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241213115704.353665-1-alexghiti@rivosinc.com>
Date: Fri, 13 Dec 2024 12:57:04 +0100
From: Alexandre Ghiti <alexghiti@...osinc.com>
To: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Anup Patel <anup@...infault.org>,
Sunil V L <sunilvl@...tanamicro.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org
Cc: Alexandre Ghiti <alexghiti@...osinc.com>
Subject: [RFC PATCH] riscv: Fix PCI warning by enabling PCI_MSI_ARCH_FALLBACKS
When the interrupt controller is not using the IMSIC and ACPI is enabled,
the following warning appears:
[ 0.866401] WARNING: CPU: 1 PID: 1 at drivers/pci/msi/msi.h:121 pci_msi_setup_msi_irqs+0x2c/0x32
[ 0.867071] Modules linked in:
[ 0.867389] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.13.0-rc2-00001-g795582ce7e24-dirty #44
[ 0.867538] Hardware name: QEMU QEMU Virtual Machine, BIOS
[ 0.867672] epc : pci_msi_setup_msi_irqs+0x2c/0x32
[ 0.867738] ra : __pci_enable_msix_range+0x30c/0x596
[ 0.867783] epc : ffffffff8050af80 ra : ffffffff8050a66e sp : ff20000000023750
[ 0.867809] gp : ffffffff815153b0 tp : ff60000080108000 t0 : ff60000081109600
[ 0.867833] t1 : 0000000000000228 t2 : 0000000000000004 s0 : ff20000000023860
[ 0.867857] s1 : ff60000080de1000 a0 : ff60000080de1000 a1 : 0000000000000005
[ 0.867880] a2 : 0000000000000011 a3 : 0000000000000000 a4 : 0000000000000000
[ 0.867902] a5 : 0000000000000000 a6 : ff600000806368f0 a7 : fffffffffffffff0
[ 0.867925] s2 : 0000000000000005 s3 : ffffffffffffffff s4 : 0000000000000000
[ 0.867948] s5 : ff60000080de10c0 s6 : 0000000000000005 s7 : 0000000000000005
[ 0.867970] s8 : ff20000000023a08 s9 : ff600000811093c0 s10: 000000000000002c
[ 0.867993] s11: ff60000081109410 t3 : 0000000000000001 t4 : ff600000803a2878
[ 0.868014] t5 : 0000000000000004 t6 : ff60000080357450
[ 0.868036] status: 0000000200000120 badaddr: ffffffff8050af80 cause: 0000000000000003
[ 0.868186] [<ffffffff8050af80>] pci_msi_setup_msi_irqs+0x2c/0x32
[ 0.868339] [<ffffffff80509172>] pci_alloc_irq_vectors_affinity+0xb8/0xe2
[ 0.868362] [<ffffffff8059d62c>] vp_find_vqs_msix+0x12a/0x370
[ 0.868385] [<ffffffff8059d8a0>] vp_find_vqs+0x2e/0x1de
[ 0.868402] [<ffffffff8059bd80>] vp_modern_find_vqs+0x12/0x4e
[ 0.868425] [<ffffffff80624a50>] init_vq+0x2b4/0x336
[ 0.868448] [<ffffffff80624c36>] virtblk_probe+0xd4/0x90e
[ 0.868469] [<ffffffff80594e02>] virtio_dev_probe+0x14a/0x1e6
[ 0.868488] [<ffffffff805fe04c>] really_probe+0x86/0x234
[ 0.868509] [<ffffffff805fe256>] __driver_probe_device+0x5c/0xda
[ 0.868529] [<ffffffff805fe392>] driver_probe_device+0x2c/0xb2
[ 0.868549] [<ffffffff805fe512>] __driver_attach+0x6c/0x11a
[ 0.868569] [<ffffffff805fc17e>] bus_for_each_dev+0x60/0xae
[ 0.868588] [<ffffffff805fda7c>] driver_attach+0x1a/0x22
[ 0.868607] [<ffffffff805fd398>] bus_add_driver+0xce/0x1d6
[ 0.868627] [<ffffffff805ff0b2>] driver_register+0x3e/0xd8
[ 0.868647] [<ffffffff80594614>] __register_virtio_driver+0x1e/0x2c
[ 0.868694] [<ffffffff80a31b82>] virtio_blk_init+0x6a/0x9e
[ 0.868733] [<ffffffff8000f128>] do_one_initcall+0x58/0x194
[ 0.868755] [<ffffffff80a011b0>] kernel_init_freeable+0x224/0x28e
[ 0.868775] [<ffffffff809e4e48>] kernel_init+0x1e/0x13a
[ 0.868795] [<ffffffff809ed952>] ret_from_fork+0xe/0x18
So enable PCI_MSI_ARCH_FALLBACKS to get rid of this.
Signed-off-by: Alexandre Ghiti <alexghiti@...osinc.com>
---
This is an RFC as I'm really not sure this is the right fix,
Anup/Sunil/Thomas if you have any idea, please step in! Thanks
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index d4a7ca0388c0..40d51feac2bb 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -199,6 +199,7 @@ config RISCV
select PCI_DOMAINS_GENERIC if PCI
select PCI_ECAM if (ACPI && PCI)
select PCI_MSI if PCI
+ select PCI_MSI_ARCH_FALLBACKS if PCI
select RISCV_ALTERNATIVE if !XIP_KERNEL
select RISCV_APLIC
select RISCV_IMSIC
--
2.39.2
Powered by blists - more mailing lists