mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
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>
This commit is contained in:
parent
270950b49d
commit
f4d10ce8aa
5 changed files with 7 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue