* [PATCH v2] RISC-V: Schedule SBI-0.1 for removal
@ 2024-09-17 13:50 Palmer Dabbelt
0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2024-09-17 13:50 UTC (permalink / raw)
To: linux-riscv, ajones, schwab; +Cc: Palmer Dabbelt
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.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
arch/riscv/Kconfig | 17 +++++++++++++----
arch/riscv/kernel/sbi.c | 1 +
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index f00d474e13d0..fad197d5e122 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -838,12 +838,21 @@ menu "Kernel features"
source "kernel/Kconfig.hz"
-config RISCV_SBI_V01
- bool "SBI v0.1 support"
+config RISCV_SBI_V01_DEPRECATED
+ bool "SBI v0.1 support (DEPRECATED)"
depends on RISCV_SBI
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.
+ This config allows kernel to use SBI v0.1 APIs.
+
+ SBI v0.1 support has been deprecated and will be removed after the
+ 2025 LTS.
+
+ If unsure what to do here, say N.
+
+config RISCV_SBI_V01
+ bool
+ default y
+ depends on RISCV_SBI_V01_DEPRECATED
config RISCV_BOOT_SPINWAIT
bool "Spinwait booting method"
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;
--
2.45.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] RISC-V: Schedule SBI-0.1 for removal
@ 2024-09-17 13:53 Palmer Dabbelt
2024-09-17 15:03 ` Andrew Jones
0 siblings, 1 reply; 4+ messages in thread
From: Palmer Dabbelt @ 2024-09-17 13:53 UTC (permalink / raw)
To: linux-riscv, ajones, schwab; +Cc: Palmer Dabbelt
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.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
arch/riscv/Kconfig | 17 +++++++++++++----
arch/riscv/kernel/sbi.c | 1 +
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index f00d474e13d0..fad197d5e122 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -838,12 +838,21 @@ menu "Kernel features"
source "kernel/Kconfig.hz"
-config RISCV_SBI_V01
- bool "SBI v0.1 support"
+config RISCV_SBI_V01_DEPRECATED
+ bool "SBI v0.1 support (DEPRECATED)"
depends on RISCV_SBI
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.
+ This config allows kernel to use SBI v0.1 APIs.
+
+ SBI v0.1 support has been deprecated and will be removed after the
+ 2025 LTS.
+
+ If unsure what to do here, say N.
+
+config RISCV_SBI_V01
+ bool
+ default y
+ depends on RISCV_SBI_V01_DEPRECATED
config RISCV_BOOT_SPINWAIT
bool "Spinwait booting method"
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;
--
2.45.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] RISC-V: Schedule SBI-0.1 for removal
2024-09-17 13:53 [PATCH v2] RISC-V: Schedule SBI-0.1 for removal Palmer Dabbelt
@ 2024-09-17 15:03 ` Andrew Jones
2024-09-25 0:04 ` Atish Patra
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Jones @ 2024-09-17 15:03 UTC (permalink / raw)
To: Palmer Dabbelt; +Cc: linux-riscv, schwab
On Tue, Sep 17, 2024 at 06:53:08AM GMT, Palmer Dabbelt wrote:
> 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.
>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> ---
> arch/riscv/Kconfig | 17 +++++++++++++----
> arch/riscv/kernel/sbi.c | 1 +
> 2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index f00d474e13d0..fad197d5e122 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -838,12 +838,21 @@ menu "Kernel features"
>
> source "kernel/Kconfig.hz"
>
> -config RISCV_SBI_V01
> - bool "SBI v0.1 support"
> +config RISCV_SBI_V01_DEPRECATED
> + bool "SBI v0.1 support (DEPRECATED)"
> depends on RISCV_SBI
> 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.
> + This config allows kernel to use SBI v0.1 APIs.
> +
> + SBI v0.1 support has been deprecated and will be removed after the
> + 2025 LTS.
> +
> + If unsure what to do here, say N.
> +
> +config RISCV_SBI_V01
> + bool
> + default y
> + depends on RISCV_SBI_V01_DEPRECATED
I think this could be simplified to
def_bool RISCV_SBI_V01_DEPRECATED
>
> config RISCV_BOOT_SPINWAIT
> bool "Spinwait booting method"
> 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");
I don't think pr_warn appends a newline.
> __sbi_set_timer = __sbi_set_timer_v01;
> __sbi_send_ipi = __sbi_send_ipi_v01;
> __sbi_rfence = __sbi_rfence_v01;
> --
> 2.45.2
>
Otherwise,
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Thanks,
drew
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] RISC-V: Schedule SBI-0.1 for removal
2024-09-17 15:03 ` Andrew Jones
@ 2024-09-25 0:04 ` Atish Patra
0 siblings, 0 replies; 4+ messages in thread
From: Atish Patra @ 2024-09-25 0:04 UTC (permalink / raw)
To: Andrew Jones, Palmer Dabbelt; +Cc: linux-riscv, schwab
On 9/17/24 8:03 AM, Andrew Jones wrote:
> On Tue, Sep 17, 2024 at 06:53:08AM GMT, Palmer Dabbelt wrote:
>> 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.
>>
>> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
>> ---
>> arch/riscv/Kconfig | 17 +++++++++++++----
>> arch/riscv/kernel/sbi.c | 1 +
>> 2 files changed, 14 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> index f00d474e13d0..fad197d5e122 100644
>> --- a/arch/riscv/Kconfig
>> +++ b/arch/riscv/Kconfig
>> @@ -838,12 +838,21 @@ menu "Kernel features"
>>
>> source "kernel/Kconfig.hz"
>>
>> -config RISCV_SBI_V01
>> - bool "SBI v0.1 support"
>> +config RISCV_SBI_V01_DEPRECATED
>> + bool "SBI v0.1 support (DEPRECATED)"
>> depends on RISCV_SBI
>> 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.
>> + This config allows kernel to use SBI v0.1 APIs.
>> +
>> + SBI v0.1 support has been deprecated and will be removed after the
>> + 2025 LTS.
>> +
>> + If unsure what to do here, say N.
>> +
>> +config RISCV_SBI_V01
>> + bool
>> + default y
>> + depends on RISCV_SBI_V01_DEPRECATED
>
> I think this could be simplified to
>
> def_bool RISCV_SBI_V01_DEPRECATED
>
>>
>> config RISCV_BOOT_SPINWAIT
>> bool "Spinwait booting method"
>> 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");
>
> I don't think pr_warn appends a newline.
>
>> __sbi_set_timer = __sbi_set_timer_v01;
>> __sbi_send_ipi = __sbi_send_ipi_v01;
>> __sbi_rfence = __sbi_rfence_v01;
>> --
>> 2.45.2
>>
>
With Drew's comment addressed:
Reviewed-by: Atish Patra <atishp@rivosinc.com>
> Otherwise,
>
> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
>
> Thanks,
> drew
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-25 0:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-17 13:53 [PATCH v2] RISC-V: Schedule SBI-0.1 for removal Palmer Dabbelt
2024-09-17 15:03 ` Andrew Jones
2024-09-25 0:04 ` Atish Patra
-- strict thread matches above, loose matches on Subject: below --
2024-09-17 13:50 Palmer Dabbelt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox