[PATCH v2 0/3] Support SSTC while PM operations
From: Nick Hu
Date: Thu Sep 26 2024 - 02:57:23 EST
When the cpu is going to be hotplug, stop the stimecmp to prevent pending
interrupt.
When the cpu is going to be suspended, save the stimecmp before entering
the suspend state and restore it in the resume path.
changes in v2:
1. Add csr_read/write_hi_lo operations
2. Apply the suggestion from Anup.
link: https://lore.kernel.org/lkml/20240829033904.477200-3-nick.hu@xxxxxxxxxx/T/#u
Nick Hu (3):
riscv: Add csr_read/write_hi_lo support
riscv: Add stimecmp save and restore
clocksource/drivers/timer-riscv: Stop stimecmp when cpu hotplug
arch/riscv/include/asm/csr.h | 22 ++++++++++++++++++++++
arch/riscv/include/asm/suspend.h | 1 +
arch/riscv/kernel/suspend.c | 6 ++++++
drivers/clocksource/timer-riscv.c | 6 ++++++
4 files changed, 35 insertions(+)
--
2.34.1