Skip to content
Commit 1f3576d0 authored by Greentime Hu's avatar Greentime Hu Committed by Andy Chiu
Browse files

riscv: Add support for kernel mode vector



Add kernel_vector_begin() and kernel_vector_end() function declarations
and corresponding definitions in kernel_mode_vector.c

These are needed to wrap uses of vector in kernel mode.

Co-developed-by: default avatarVincent Chen <vincent.chen@sifive.com>
Signed-off-by: default avatarVincent Chen <vincent.chen@sifive.com>
Signed-off-by: default avatarGreentime Hu <greentime.hu@sifive.com>
Signed-off-by: default avatarAndy Chiu <andy.chiu@sifive.com>
Reviewed-by: default avatarEric Biggers <ebiggers@google.com>
---
Changelog v10:
 - update comment (Eric)
Changelog v9:
 - use bitwise to mask on/off the use of Vector (Eric, Charlie)
 - BUG_ON when reentrant enablement of Vector happens (Charlie)
 - Move compiler barrier to the premept_v patch (Eric)
Changelog v8:
 - Refactor unnecessary whitespace change (Eric)
Changelog v7:
 - fix build fail for allmodconfig
Changelog v6:
 - Use 8 bits to track non-preemptible vector context to provide better
   WARN coverage.
Changelog v4:
 - Use kernel_v_flags and helpers to track vector context.
Changelog v3:
 - Reorder patch 1 to patch 3 to make use of
   {get,put}_cpu_vector_context later.
 - Export {get,put}_cpu_vector_context.
 - Save V context after disabling preemption. (Guo)
 - Fix a build fail. (Conor)
 - Remove irqs_disabled() check as it is not needed, fix styling. (Björn)
Changelog v2:
 - 's/kernel_rvv/kernel_vector' and return void in kernel_vector_begin
   (Conor)
 - export may_use_simd to include/asm/simd.h
parent d4abde52
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment