[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251202-preserve-aplic-imsic-v3-0-1844fbf1fe92@sifive.com>
Date: Tue, 02 Dec 2025 14:07:39 +0800
From: Nick Hu <nick.hu@...ive.com>
To: Anup Patel <anup@...infault.org>, Thomas Gleixner <tglx@...utronix.de>,
Paul Walmsley <pjw@...nel.org>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
Yong-Xuan Wang <yongxuan.wang@...ive.com>, Cyan Yang <cyan.yang@...ive.com>,
Nutty Liu <liujingqi@...xincomputing.com>, Nick Hu <nick.hu@...ive.com>
Subject: [PATCH v3 0/2] riscv-imsic/aplic: Preserve IMSIC and APLIC states
during suspend
Since the APLIC and IMSIC may be reset when the platform enters a deep
sleep state, it is necessary to implement save and restore functions
to ensure their states are correctly preserved and restored.
Chagnes in V3:
- Refine the commit messages and comments
- Rename "imsic_restore()" to "imsic_hw_states_init()"
- Rename "aplic_direct_restore()" to "aplic_direct_restore_states()"
- Rename "aplic_add()" to "aplic_pm_add()"
- Rename "aplic_remove()" to "aplic_pm_remove()"
- Rename "aplic_save()" to "aplic_save_states()"
- Rename "aplic_restore()" to "aplic_restore_states()"
- Use "struct aplic_saved_regs" and "struct aplic_src_ctrl" to preserve
the APLIC states
Changes in V2:
- Address the compile error from kernel test robot when
CONFIG_RISCV_M_MODE is enabled.
- Rename "imsic_notifier_block" to "imsic_pm_notifier_block"
- Reanme "aplic_notifier" to "aplic_pm_notifier"
- Make aplic_add() as static and directly call it from aplic_setup_priv().
- Rename "list" as "head" and make it first variable in "struct aplic_priv"
Nick Hu (2):
irqchip/riscv-imsic: Restore the IMSIC registers
irqchip/riscv-aplic: Save and restore APLIC registers
drivers/irqchip/irq-riscv-aplic-direct.c | 11 ++
drivers/irqchip/irq-riscv-aplic-main.c | 158 ++++++++++++++++++++++-
drivers/irqchip/irq-riscv-aplic-main.h | 11 ++
drivers/irqchip/irq-riscv-imsic-early.c | 41 ++++--
4 files changed, 212 insertions(+), 9 deletions(-)
--
2.17.1
_______________________________________________
linux-riscv mailing list
linux-riscv@...ts.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
---
Nick Hu (2):
irqchip/riscv-imsic: Add a CPU pm notifier to restore the IMSIC on exit
irqchip/riscv-aplic: Preserve APLIC states across suspend/resume
drivers/irqchip/irq-riscv-aplic-direct.c | 10 ++
drivers/irqchip/irq-riscv-aplic-main.c | 166 ++++++++++++++++++++++++++++++-
drivers/irqchip/irq-riscv-aplic-main.h | 19 ++++
drivers/irqchip/irq-riscv-imsic-early.c | 39 ++++++--
4 files changed, 225 insertions(+), 9 deletions(-)
---
base-commit: 1b5dd29869b1e63f7e5c37d7552e2dcf22de3c26
change-id: 20251118-preserve-aplic-imsic-028bbb5d18da
Best regards,
--
Nick Hu <nick.hu@...ive.com>
Powered by blists - more mailing lists