]> git.ipfire.org Git - thirdparty/linux.git/commit
irqchip/riscv-aplic: Preserve APLIC states across suspend/resume
authorNick Hu <nick.hu@sifive.com>
Tue, 2 Dec 2025 06:07:41 +0000 (14:07 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 16 Dec 2025 18:08:43 +0000 (19:08 +0100)
commit95a8ddde36601d0a645475fb080ed118db59c8c3
tree1451dc89f092ba95b3cf5f5d5b1776cd0068aaef
parentf48b4bd0915bf61ac12b8c65c7939ebd03bc8abf
irqchip/riscv-aplic: Preserve APLIC states across suspend/resume

The APLIC states might be reset when the platform enters a low power
state, but the register states are not being preserved and restored,
which prevents interrupt delivery after the platform resumes.
Solve this by adding a syscore ops and a power management notifier to
preserve and restore the APLIC states on suspend and resume.

[ tglx: Folded the build fix provided by Geert ]

Signed-off-by: Nick Hu <nick.hu@sifive.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Reviewed-by: Cyan Yang <cyan.yang@sifive.com>
Reviewed-by: Nutty Liu <liujingqi@lanxincomputing.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://patch.msgid.link/20251202-preserve-aplic-imsic-v3-2-1844fbf1fe92@sifive.com
drivers/irqchip/irq-riscv-aplic-direct.c
drivers/irqchip/irq-riscv-aplic-main.c
drivers/irqchip/irq-riscv-aplic-main.h