From f4d10ce8aa545266a0b6df223a7f8ea2afca18b2 Mon Sep 17 00:00:00 2001 From: Tianrui Zhao Date: Tue, 27 Dec 2022 11:19:57 +0800 Subject: hw/intc/loongarch_pch: Change default irq number of pch irq controller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230104020518.2564263-4-zhaotianrui@loongson.cn> Signed-off-by: Song Gao --- hw/intc/loongarch_pch_pic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/intc') diff --git a/hw/intc/loongarch_pch_pic.c b/hw/intc/loongarch_pch_pic.c index 33966e7bac..9208fc4460 100644 --- a/hw/intc/loongarch_pch_pic.c +++ b/hw/intc/loongarch_pch_pic.c @@ -9,6 +9,7 @@ #include "qemu/bitops.h" #include "hw/sysbus.h" #include "hw/loongarch/virt.h" +#include "hw/pci-host/ls7a.h" #include "hw/irq.h" #include "hw/intc/loongarch_pch_pic.h" #include "hw/qdev-properties.h" @@ -377,7 +378,7 @@ static void loongarch_pch_pic_realize(DeviceState *dev, Error **errp) { LoongArchPCHPIC *s = LOONGARCH_PCH_PIC(dev); - if (!s->irq_num || s->irq_num > PCH_PIC_IRQ_NUM) { + if (!s->irq_num || s->irq_num > VIRT_PCH_PIC_IRQ_NUM) { error_setg(errp, "Invalid 'pic_irq_num'"); return; } -- cgit v1.2.3