Skip to content

Commit c84efbb

Browse files
lvjianmin-loongsonMarc Zyngier
authored andcommitted
irqchip/loongson-pch-pic: Fix registration of syscore_ops
When support suspend/resume for loongson-pch-pic, the syscore_ops is registered twice in dual-bridges machines where there are two pch-pic IRQ domains. Repeated registration of an same syscore_ops broke syscore_ops_list, so the patch will corret it. Fixes: 1ed008a ("irqchip/loongson-pch-pic: 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 bdd6021 commit c84efbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/irqchip/irq-loongson-pch-pic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ static int pch_pic_init(phys_addr_t addr, unsigned long size, int vec_base,
311311
pch_pic_handle[nr_pics] = domain_handle;
312312
pch_pic_priv[nr_pics++] = priv;
313313

314-
register_syscore_ops(&pch_pic_syscore_ops);
314+
if (nr_pics == 1)
315+
register_syscore_ops(&pch_pic_syscore_ops);
315316

316317
return 0;
317318

0 commit comments

Comments
 (0)