Skip to content

Commit bdd6021

Browse files
lvjianmin-loongsonMarc Zyngier
authored andcommitted
irqchip/loongson-eiointc: Fix registration of syscore_ops
When support suspend/resume for loongson-eiointc, the syscore_ops is registered twice in dual-bridges machines where there are two eiointc IRQ domains. Repeated registration of an same syscore_ops broke syscore_ops_list. Also, cpuhp_setup_state_nocalls is only needed to call for once. So the patch will corret them. Fixes: a90335c ("irqchip/loongson-eiointc: Add suspend/resume support") Cc: [email protected] Signed-off-by: Jianmin Lv <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 64cc451 commit bdd6021

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/irqchip/irq-loongson-eiointc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,12 @@ int __init eiointc_acpi_init(struct irq_domain *parent,
422422
parent_irq = irq_create_mapping(parent, acpi_eiointc->cascade);
423423
irq_set_chained_handler_and_data(parent_irq, eiointc_irq_dispatch, priv);
424424

425-
register_syscore_ops(&eiointc_syscore_ops);
426-
cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_LOONGARCH_STARTING,
425+
if (nr_pics == 1) {
426+
register_syscore_ops(&eiointc_syscore_ops);
427+
cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_LOONGARCH_STARTING,
427428
"irqchip/loongarch/intc:starting",
428429
eiointc_router_init, NULL);
430+
}
429431

430432
if (cpu_has_flatmode)
431433
node = cpu_to_node(acpi_eiointc->node * CORES_PER_EIO_NODE);

0 commit comments

Comments
 (0)