[v1, 6/6] riscv: vector: enable preemptive kernel-mode Vector to be built
Andy Chiu
andy.chiu at sifive.com
Sat Jul 15 08:00:32 PDT 2023
Add a Kconfig to let user decides whether kernel-mode Vector in a
preemptive kernel should also run with preemption. If the config is 'N',
then all kernel-mode Vector code are run with preemption disabled.
Signed-off-by: Andy Chiu <andy.chiu at sifive.com>
---
arch/riscv/Kconfig | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index a9e8b697fefb..da6a45ea42ec 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -500,6 +500,16 @@ config RISCV_ISA_V_DEFAULT_ENABLE
If you don't know what to do here, say Y.
+config RISCV_ISA_V_PREEMPTIVE_KMV
+ bool "Run kernel-mode Vector with kernel preemption"
+ depends on PREEMPTION
+ depends on RISCV_ISA_V
+ default y
+ help
+ Ordinarily the kernel disables preemption before running in-kernel
+ Vector code. This config frees the kernel from disabling preemption
+ by adding meory on demand for tracking kernel's V-context.
+
config TOOLCHAIN_HAS_ZBB
bool
default y
--
2.17.1
More information about the linux-riscv
mailing list