mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] riscv-imsic/aplic: Preserve IMSIC and APLIC states during suspend
@ 2025-12-02  6:07 Nick Hu
  2025-12-02  6:07 ` [PATCH v3 1/2] irqchip/riscv-imsic: Add a CPU pm notifier to restore the IMSIC on exit Nick Hu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nick Hu @ 2025-12-02  6:07 UTC (permalink / raw)
  To: Anup Patel, Thomas Gleixner, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti
  Cc: linux-riscv, linux-kernel, Yong-Xuan Wang, Cyan Yang, Nutty Liu, Nick Hu

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@lists.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@sifive.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-02-20  4:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-02  6:07 [PATCH v3 0/2] riscv-imsic/aplic: Preserve IMSIC and APLIC states during suspend Nick Hu
2025-12-02  6:07 ` [PATCH v3 1/2] irqchip/riscv-imsic: Add a CPU pm notifier to restore the IMSIC on exit Nick Hu
2025-12-15 21:46   ` [tip: irq/drivers] " tip-bot2 for Nick Hu
2025-12-02  6:07 ` [PATCH v3 2/2] irqchip/riscv-aplic: Preserve APLIC states across suspend/resume Nick Hu
2025-12-03 14:16   ` Anup Patel
2025-12-15 21:46   ` [tip: irq/drivers] " tip-bot2 for Nick Hu
2025-12-17 17:36   ` tip-bot2 for Nick Hu
2026-02-20  4:10 ` [PATCH v3 0/2] riscv-imsic/aplic: Preserve IMSIC and APLIC states during suspend patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome