qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 0/2] fix pci device can't alloc irq from fdt
@ 2025-11-17  7:14 Xianglai Li
  2025-11-17  7:14 ` [PATCH V3 1/2] Modify the interrupt trigger type in loongarch virt fdt to macro definition Xianglai Li
  2025-11-17  7:14 ` [PATCH V3 2/2] fix pci device can't alloc irq from fdt Xianglai Li
  0 siblings, 2 replies; 4+ messages in thread
From: Xianglai Li @ 2025-11-17  7:14 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:
V2->V3:
1.Delete unnecessary changes
2.Replace some magic numbers with macro definitions

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 | 55 +++++++++++++++++++++++------------
 1 file changed, 37 insertions(+), 18 deletions(-)

-- 
2.39.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-18  1:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17  7:14 [PATCH V3 0/2] fix pci device can't alloc irq from fdt Xianglai Li
2025-11-17  7:14 ` [PATCH V3 1/2] Modify the interrupt trigger type in loongarch virt fdt to macro definition Xianglai Li
2025-11-17  7:14 ` [PATCH V3 2/2] fix pci device can't alloc irq from fdt Xianglai Li
2025-11-18  1:53   ` Bibo Mao

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).