Skip to content

Commit 6216182

Browse files
ConchuODAlexandre Ghiti
authored andcommitted
RISC-V: clarify what some RISCV_ISA* config options do
During some discussion on IRC yesterday and on Pu's bpf patch [1] I noticed that these RISCV_ISA* Kconfig options are not really clear about their implications. Many of these options have no impact on what userspace is allowed to do, for example an application can use Zbb regardless of whether or not the kernel does. Change the help text to try and clarify whether or not an option affects just the kernel, or also userspace. None of these options actually control whether or not an extension is detected dynamically as that's done regardless of Kconfig options, so drop any text that implies the option is required for dynamic detection, rewording them as "do x when y is detected". Link: https://lore.kernel.org/linux-riscv/20240328-ferocity-repose-c554f75a676c@spud/ [1] Reviewed-by: Andrew Jones <[email protected]> Signed-off-by: Conor Dooley <[email protected]> Reviewed-by: Charlie Jenkins <[email protected]> Reviewed-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/20241024-overdue-slogan-0b0f69d3da91@spud Signed-off-by: Alexandre Ghiti <[email protected]>
1 parent 4295f4c commit 6216182

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

arch/riscv/Kconfig

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,8 @@ config RISCV_ISA_C
527527
help
528528
Adds "C" to the ISA subsets that the toolchain is allowed to emit
529529
when building Linux, which results in compressed instructions in the
530-
Linux binary.
530+
Linux binary. This option produces a kernel that will not run on
531+
systems that do not support compressed instructions.
531532

532533
If you don't know what to do here, say Y.
533534

@@ -537,8 +538,8 @@ config RISCV_ISA_SVNAPOT
537538
depends on RISCV_ALTERNATIVE
538539
default y
539540
help
540-
Allow kernel to detect the Svnapot ISA-extension dynamically at boot
541-
time and enable its usage.
541+
Enable support for the Svnapot ISA-extension when it is detected
542+
at boot.
542543

543544
The Svnapot extension is used to mark contiguous PTEs as a range
544545
of contiguous virtual-to-physical translations for a naturally
@@ -556,9 +557,8 @@ config RISCV_ISA_SVPBMT
556557
depends on RISCV_ALTERNATIVE
557558
default y
558559
help
559-
Adds support to dynamically detect the presence of the Svpbmt
560-
ISA-extension (Supervisor-mode: page-based memory types) and
561-
enable its usage.
560+
Add support for the Svpbmt ISA-extension (Supervisor-mode:
561+
page-based memory types) in the kernel when it is detected at boot.
562562

563563
The memory type for a page contains a combination of attributes
564564
that indicate the cacheability, idempotency, and ordering
@@ -577,14 +577,15 @@ config TOOLCHAIN_HAS_V
577577
depends on AS_HAS_OPTION_ARCH
578578

579579
config RISCV_ISA_V
580-
bool "VECTOR extension support"
580+
bool "Vector extension support"
581581
depends on TOOLCHAIN_HAS_V
582582
depends on FPU
583583
select DYNAMIC_SIGFRAME
584584
default y
585585
help
586-
Say N here if you want to disable all vector related procedure
587-
in the kernel.
586+
Add support for the Vector extension when it is detected at boot.
587+
When this option is disabled, neither the kernel nor userspace may
588+
use vector procedures.
588589

589590
If you don't know what to do here, say Y.
590591

@@ -667,8 +668,8 @@ config RISCV_ISA_ZBB
667668
depends on RISCV_ALTERNATIVE
668669
default y
669670
help
670-
Adds support to dynamically detect the presence of the ZBB
671-
extension (basic bit manipulation) and enable its usage.
671+
Add support for enabling optimisations in the kernel when the
672+
Zbb extension is detected at boot.
672673

673674
The Zbb extension provides instructions to accelerate a number
674675
of bit-specific operations (count bit population, sign extending,
@@ -707,9 +708,9 @@ config RISCV_ISA_ZICBOM
707708
select RISCV_DMA_NONCOHERENT
708709
select DMA_DIRECT_REMAP
709710
help
710-
Adds support to dynamically detect the presence of the ZICBOM
711-
extension (Cache Block Management Operations) and enable its
712-
usage.
711+
Add support for the Zicbom extension (Cache Block Management
712+
Operations) and enable its use in the kernel when it is detected
713+
at boot.
713714

714715
The Zicbom extension can be used to handle for example
715716
non-coherent DMA support on devices that need it.
@@ -722,7 +723,7 @@ config RISCV_ISA_ZICBOZ
722723
default y
723724
help
724725
Enable the use of the Zicboz extension (cbo.zero instruction)
725-
when available.
726+
in the kernel when it is detected at boot.
726727

727728
The Zicboz extension is used for faster zeroing of memory.
728729

@@ -760,8 +761,9 @@ config FPU
760761
bool "FPU support"
761762
default y
762763
help
763-
Say N here if you want to disable all floating-point related procedure
764-
in the kernel.
764+
Add support for floating point operations when an FPU is detected at
765+
boot. When this option is disabled, neither the kernel nor userspace
766+
may use the floating point unit.
765767

766768
If you don't know what to do here, say Y.
767769

0 commit comments

Comments
 (0)