public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/3] riscv: sbi: Switch to the sys-off handler API
@ 2022-12-28 16:19 Samuel Holland
  2022-12-28 16:19 ` [PATCH 1/3] kernel/reboot: Use the static sys-off handler for any priority Samuel Holland
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Samuel Holland @ 2022-12-28 16:19 UTC (permalink / raw)
  To: Palmer Dabbelt, Dmitry Osipenko, Rafael J . Wysocki
  Cc: Samuel Holland, Albert Ou, Anup Patel, Atish Patra,
	Geert Uytterhoeven, Heiko Stuebner, Kai-Heng Feng,
	Luis Chamberlain, Paul E. McKenney, Paul Walmsley, Petr Mladek,
	YueHaibing, linux-kernel, linux-riscv, tangmeng

I want to convert the axp20x PMIC poweroff handler to use the sys-off
API, so it can be used as a fallback for if the SBI poweroff handler
is unavailable. But the SBI poweroff handler still uses pm_power_off, so
done alone, this would cause the axp20x callback to be called first,
before the SBI poweroff handler has a chance to run.

In order to prevent this change in behavior, the SBI poweroff handler
needs to be converted to the sys-off API first, at a higher priority.

This series performs the conversion, after accounting for the fact that
the SBI poweroff handler is registered quite early during boot.

The first patch is a dependency for both this series and the PSCI
series[1], so I would like to get at least patch 1 merged soon.

[1]: https://lore.kernel.org/lkml/20221105214841.7828-1-samuel@sholland.org/


Samuel Holland (3):
  kernel/reboot: Use the static sys-off handler for any priority
  riscv: sbi: Share the code for unsupported extension warnings
  riscv: sbi: Switch to the sys-off handler API

 arch/riscv/include/asm/sbi.h |  1 -
 arch/riscv/kernel/sbi.c      | 63 +++++++++++++++++++++---------------
 kernel/reboot.c              | 10 +++---
 3 files changed, 41 insertions(+), 33 deletions(-)

-- 
2.37.4


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2023-05-12 21:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-28 16:19 [PATCH 0/3] riscv: sbi: Switch to the sys-off handler API Samuel Holland
2022-12-28 16:19 ` [PATCH 1/3] kernel/reboot: Use the static sys-off handler for any priority Samuel Holland
2023-02-15  0:17   ` Palmer Dabbelt
2023-02-18 23:20     ` Samuel Holland
2023-02-18 23:32       ` Dmitry Osipenko
2023-03-15  3:10         ` Palmer Dabbelt
2022-12-28 16:19 ` [PATCH 2/3] riscv: sbi: Share the code for unsupported extension warnings Samuel Holland
2023-01-03  8:54   ` Geert Uytterhoeven
2022-12-28 16:19 ` [PATCH 3/3] riscv: sbi: Switch to the sys-off handler API Samuel Holland
2022-12-28 18:30 ` [PATCH 0/3] " Conor Dooley
2023-01-03 10:54   ` Conor Dooley
2023-05-12 21:50   ` Palmer Dabbelt
2023-05-12 21:51     ` Palmer Dabbelt
2023-05-11 20:53 ` Palmer Dabbelt

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