qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/2] fix pci device can't alloc irq from fdt
@ 2025-11-12  3:26 Xianglai Li
  0 siblings, 0 replies; only message in thread
From: Xianglai Li @ 2025-11-12  3:26 UTC (permalink / raw)
  To: qemu-devel, lixianglai; +Cc: Bibo Mao, Jiaxun Yang, Song Gao

When we use the -kernel parameter to start an elf format kernel relying on
fdt, we get the following error:

pcieport 0000:00:01.0: of_irq_parse_pci: failed with rc=-22
pcieport 0000:00:01.0: enabling device (0000 -> 0003)
pcieport 0000:00:01.0: PME: Signaling with IRQ 19
pcieport 0000:00:01.0: AER: enabled with IRQ 19
pcieport 0000:00:01.1: of_irq_parse_pci: failed with rc=-22
pcieport 0000:00:01.1: enabling device (0000 -> 0003)
pcieport 0000:00:01.1: PME: Signaling with IRQ 20
pcieport 0000:00:01.1: AER: enabled with IRQ 20
pcieport 0000:00:01.2: of_irq_parse_pci: failed with rc=-22
pcieport 0000:00:01.2: enabling device (0000 -> 0003)
pcieport 0000:00:01.2: PME: Signaling with IRQ 21
pcieport 0000:00:01.2: AER: enabled with IRQ 21
pcieport 0000:00:01.3: of_irq_parse_pci: failed with rc=-22
pcieport 0000:00:01.3: enabling device (0000 -> 0003)
pcieport 0000:00:01.3: PME: Signaling with IRQ 22
pcieport 0000:00:01.3: AER: enabled with IRQ 22
pcieport 0000:00:01.4: of_irq_parse_pci: failed with rc=-22

This is because  the description of interrupt-cell is missing in the pcie
irq map.  And there is a lack of a description of the interrupt trigger
type.  Now it is corrected and the correct interrupt-cell is added in the
pcie irq map.

Refer to the implementation in arm and add some comments.

changes:
V1->V2:
1.Fallback the incorrect modification of pch_pic interrupt-cells and add
the interrupt trigger type in the pcie irq map
2.Add macro definitions for the interrupt trigger types of fdt
3.Refer to the implementation in arm and add some comments.

Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Song Gao <gaosong@loongson.cn>

Xianglai Li (2):
  Modify the interrupt trigger type in loongarch virt fdt to macro
    definition
  fix pci device can't alloc irq from fdt

 hw/loongarch/virt-fdt-build.c | 52 ++++++++++++++++++++++++-----------
 1 file changed, 36 insertions(+), 16 deletions(-)

-- 
2.39.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-12  3:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12  3:26 [PATCH V2 0/2] fix pci device can't alloc irq from fdt Xianglai Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).