Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

riscv: sbi: Switch to new sys-off handler API

Kernel now supports chained power-off handlers. Use
register_platform_power_off() that registers a platform level power-off
handler. Legacy pm_power_off() will be removed once all drivers and archs
are converted to the new sys-off API.

Signed-off-by: Andrew Davis <afd@ti.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250813151855.105237-1-afd@ti.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>

authored by

Andrew Davis and committed by
Paul Walmsley
70ddf86d 16d18e3e

+2 -2
+2 -2
arch/riscv/kernel/sbi.c
··· 148 148 149 149 static void sbi_set_power_off(void) 150 150 { 151 - pm_power_off = sbi_shutdown; 151 + register_platform_power_off(sbi_shutdown); 152 152 } 153 153 #else 154 154 static void __sbi_set_timer_v01(uint64_t stime_value) ··· 682 682 if (sbi_spec_version >= sbi_mk_version(0, 3) && 683 683 sbi_probe_extension(SBI_EXT_SRST)) { 684 684 pr_info("SBI SRST extension detected\n"); 685 - pm_power_off = sbi_srst_power_off; 685 + register_platform_power_off(sbi_srst_power_off); 686 686 sbi_srst_reboot_nb.notifier_call = sbi_srst_reboot; 687 687 sbi_srst_reboot_nb.priority = 192; 688 688 register_restart_handler(&sbi_srst_reboot_nb);