Use the GICv5 interrupt type and absolute SPI number for platform devices. Preserve the legacy GICv2/v3 DT encoding for other VMs. Tested-by: Vladimir Murzin Signed-off-by: Sascha Bischoff --- arm64/fdt.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arm64/fdt.c b/arm64/fdt.c index 5413956d..e92ae044 100644 --- a/arm64/fdt.c +++ b/arm64/fdt.c @@ -63,11 +63,13 @@ static void generate_cpu_nodes(void *fdt, struct kvm *kvm) static void generate_irq_prop(void *fdt, u8 irq, enum irq_type irq_type) { - u32 irq_prop[] = { - cpu_to_fdt32(GIC_FDT_IRQ_TYPE_SPI), - cpu_to_fdt32(irq - GIC_SPI_IRQ_BASE), - cpu_to_fdt32(irq_type) - }; + u32 irq_prop[3]; + u32 type = gic__get_spi_fdt_type(); + u32 intid = irq - gic__get_spi_base(); + + irq_prop[0] = cpu_to_fdt32(type); + irq_prop[1] = cpu_to_fdt32(intid); + irq_prop[2] = cpu_to_fdt32(irq_type); _FDT(fdt_property(fdt, "interrupts", irq_prop, sizeof(irq_prop))); } -- 2.34.1