[v9, 01/10] riscv: Add support for kernel mode vector

Eric Biggers ebiggers at kernel.org
Fri Dec 29 17:05:44 PST 2023


On Fri, Dec 29, 2023 at 02:36:18PM +0000, Andy Chiu wrote:
> From: Greentime Hu <greentime.hu at sifive.com>
> 
> 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: Vincent Chen <vincent.chen at sifive.com>
> Signed-off-by: Vincent Chen <vincent.chen at sifive.com>
> Signed-off-by: Greentime Hu <greentime.hu at sifive.com>
> Signed-off-by: Andy Chiu <andy.chiu at sifive.com>

Reviewed-by: Eric Biggers <ebiggers at google.com>

> +/*
> + * We use a flag to track in-kernel Vector context. Currently the flag has the
> + * following meaning:
> + *
> + *  - bit 0: indicates whether the in-kernel Vector context is active. The
> + *    activation of this state disables the preemption. Currently only 0 and 1
> + *    are valid value for this field. Other values are reserved for future uses.
> + */

The last two sentences above can be deleted.  Bits can only be 0 or 1.

- Eric



More information about the linux-riscv mailing list