提交 cde56261 编写于 作者: J Jianmin Lv 提交者: Hongchen Zhang

irqchip/loongson: Fix syscore ops registration

LoongArch inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6ONTH

--------------------------------

In irq-loongson-eiointc and irq-loongson-pch-pic, syscore
ops is registrated two times, which will break the syscore
ops list.
Signed-off-by: NJianmin Lv <lvjianmin@loongson.cn>
Change-Id: I87d4af80afbe5397c25a8d799e844528650c9e2c
上级 d6b1585a
......@@ -429,10 +429,12 @@ int __init eiointc_acpi_init(struct irq_domain *parent,
parent_irq = irq_create_mapping(parent, acpi_eiointc->cascade);
irq_set_chained_handler_and_data(parent_irq, eiointc_irq_dispatch, priv);
register_syscore_ops(&eiointc_syscore_ops);
cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_LOONGARCH_STARTING,
if (nr_pics == 1) {
register_syscore_ops(&eiointc_syscore_ops);
cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_LOONGARCH_STARTING,
"irqchip/loongarch/intc:starting",
eiointc_router_init, NULL);
}
if (cpu_has_flatmode)
node = cpu_to_node(node * CORES_PER_EIO_NODE);
......
......@@ -305,7 +305,8 @@ static int pch_pic_init(phys_addr_t addr, unsigned long size, int vec_base,
pch_pic_handle[nr_pics] = domain_handle;
pch_pic_priv[nr_pics++] = priv;
register_syscore_ops(&pch_pic_syscore_ops);
if (nr_pics == 1)
register_syscore_ops(&pch_pic_syscore_ops);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册