mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 04:43:54 -06:00
hw/intc/loongarch_ipi: Notify ipi object when cpu is plugged
Use hotplug_handler_plug() to nofity ipi object when cold-plug cpu is created, so that ipi can set and configure irq routing to new cpu. Signed-off-by: Bibo Mao <maobibo@loongson.cn>
This commit is contained in:
parent
54492213e6
commit
50ebc3fc47
1 changed files with 2 additions and 3 deletions
|
@ -317,6 +317,7 @@ static void virt_cpu_irq_init(LoongArchVirtMachineState *lvms)
|
|||
MachineClass *mc = MACHINE_GET_CLASS(ms);
|
||||
const CPUArchIdList *possible_cpus;
|
||||
CPUState *cs;
|
||||
Error *err = NULL;
|
||||
|
||||
/* cpu nodes */
|
||||
possible_cpus = mc->possible_cpu_arch_ids(ms);
|
||||
|
@ -326,9 +327,7 @@ static void virt_cpu_irq_init(LoongArchVirtMachineState *lvms)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* connect ipi irq to cpu irq */
|
||||
qdev_connect_gpio_out(lvms->ipi, num,
|
||||
qdev_get_gpio_in(DEVICE(cs), IRQ_IPI));
|
||||
hotplug_handler_plug(HOTPLUG_HANDLER(lvms->ipi), DEVICE(cs), &err);
|
||||
|
||||
/*
|
||||
* connect ext irq to the cpu irq
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue