Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Support SSTC while PM operations
@ 2024-09-26  6:54 Nick Hu
  2024-09-26  6:54 ` [PATCH v2 1/3] riscv: Add csr_read/write_hi_lo support Nick Hu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nick Hu @ 2024-09-26  6:54 UTC (permalink / raw)
  To: greentime.hu, zong.li, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Rafael J. Wysocki, Pavel Machek, Daniel Lezcano, Thomas Gleixner,
	Anup Patel, Andrew Jones, Conor Dooley, Mayuresh Chitale,
	Atish Patra, Samuel Holland, Nick Hu, Samuel Ortiz, Sunil V L,
	linux-riscv, linux-kernel, linux-pm

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


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

end of thread, other threads:[~2024-10-02  1:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26  6:54 [PATCH v2 0/3] Support SSTC while PM operations Nick Hu
2024-09-26  6:54 ` [PATCH v2 1/3] riscv: Add csr_read/write_hi_lo support Nick Hu
2024-09-26  7:59   ` Andrew Jones
     [not found]     ` <CAKddAkCJt5t_WyMuwSMb8qE4LHWy8GZ4QWZy6ViJvx-p5YBfuQ@mail.gmail.com>
2024-10-02  1:57       ` Nick Hu
2024-09-26  6:54 ` [PATCH v2 2/3] riscv: Add stimecmp save and restore Nick Hu
2024-09-26  6:54 ` [PATCH v2 3/3] clocksource/drivers/timer-riscv: Stop stimecmp when cpu hotplug Nick Hu
2024-09-26  9:40   ` Anup Patel
2024-09-26  9:47   ` Andrew Jones

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