diff mbox series

RISC-V: Schedule SBI-0.1 for removal

Message ID 20240904145404.6291-2-palmer@rivosinc.com (mailing list archive)
State Superseded
Headers show
Series RISC-V: Schedule SBI-0.1 for removal | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/vmtest-fixes-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh took 133.08s
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 1344.37s
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1576.94s
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 19.96s
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 22.24s
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh took 0.64s
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh took 42.04s
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.00s
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.59s
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh took 0.01s
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.00s
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.03s

Commit Message

Palmer Dabbelt Sept. 4, 2024, 2:54 p.m. UTC
We've said we're going to deprecate SBI-0.1 for a while now, but I
didn't find that written down anywhere.  So mark SBI-0.1 as deprecated
and print a timeline for that deprecation on systems that probe it.

This also hides the Kconfig behind EXPERT, in the hope that doing so
will poke users to notice the deprecation.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
I don't know if there's some normal way to mark things as deprecated,
this is just the best I could come up with this morning.
---
 arch/riscv/Kconfig      | 2 +-
 arch/riscv/kernel/sbi.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Andreas Schwab Sept. 4, 2024, 3:06 p.m. UTC | #1
Perhaps follow the example of commit eb07c4f39c3e ("mm/slab: rename
CONFIG_SLAB to CONFIG_SLAB_DEPRECATED")
Andrew Jones Sept. 5, 2024, 11:58 a.m. UTC | #2
On Wed, Sep 04, 2024 at 05:06:33PM GMT, Andreas Schwab wrote:
> Perhaps follow the example of commit eb07c4f39c3e ("mm/slab: rename
> CONFIG_SLAB to CONFIG_SLAB_DEPRECATED")
>

Yeah, at least deprecated.html points out that the "_deprecated" attribute
is a typical way to convey that something is deprecated [1].

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#id1

Thanks,
drew
diff mbox series

Patch

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 0f3cd7c3a436..e70ff952d68e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -832,7 +832,7 @@  source "kernel/Kconfig.hz"
 
 config RISCV_SBI_V01
 	bool "SBI v0.1 support"
-	depends on RISCV_SBI
+	depends on RISCV_SBI && EXPERT
 	help
 	  This config allows kernel to use SBI v0.1 APIs. This will be
 	  deprecated in future once legacy M-mode software are no longer in use.
diff --git a/arch/riscv/kernel/sbi.c b/arch/riscv/kernel/sbi.c
index 837bdab2601b..1209a4e53ed1 100644
--- a/arch/riscv/kernel/sbi.c
+++ b/arch/riscv/kernel/sbi.c
@@ -686,6 +686,7 @@  void __init sbi_init(void)
 			sbi_debug_console_available = true;
 		}
 	} else {
+		pr_warn("SBI-0.1 is deprecated and scheduled for removal after the 2025 LTS");
 		__sbi_set_timer = __sbi_set_timer_v01;
 		__sbi_send_ipi	= __sbi_send_ipi_v01;
 		__sbi_rfence	= __sbi_rfence_v01;