summary refs log tree commit diff stats
path: root/hw/loongarch/virt.c
diff options
context:
space:
mode:
authorTianrui Zhao <zhaotianrui@loongson.cn>2022-12-27 11:19:57 +0800
committerSong Gao <gaosong@loongson.cn>2023-01-06 14:12:43 +0800
commitf4d10ce8aa545266a0b6df223a7f8ea2afca18b2 (patch)
treee2b3a100c9294d8590dd0561d21d8f780d082ab4 /hw/loongarch/virt.c
parent270950b49d36659372acbc12e65ff34969bed678 (diff)
downloadfocaccia-qemu-f4d10ce8aa545266a0b6df223a7f8ea2afca18b2.tar.gz
focaccia-qemu-f4d10ce8aa545266a0b6df223a7f8ea2afca18b2.zip
hw/intc/loongarch_pch: Change default irq number of pch irq controller
Change the default irq number of pch pic to 32, so that the irq
number of pch msi is 224(256 - 32), and move the 'PCH_PIC_IRQ_NUM'
macro to pci-host/ls7a.h and add prefix 'VIRT' on it to keep standard
format.

Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230104020518.2564263-4-zhaotianrui@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'hw/loongarch/virt.c')
-rw-r--r--hw/loongarch/virt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 35d4bce3b3..66be925068 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -616,7 +616,7 @@ static void loongarch_irq_init(LoongArchMachineState *lams)
     }
 
     pch_pic = qdev_new(TYPE_LOONGARCH_PCH_PIC);
-    num = PCH_PIC_IRQ_NUM;
+    num = VIRT_PCH_PIC_IRQ_NUM;
     qdev_prop_set_uint32(pch_pic, "pch_pic_irq_num", num);
     d = SYS_BUS_DEVICE(pch_pic);
     sysbus_realize_and_unref(d, &error_fatal);