[PATCH 2/4] riscv: entry: Balance vector context nesting

Matthew Bystrin dev.mbstr at gmail.com
Thu Jun 6 14:36:40 PDT 2024


Hi! Thanks for the patch!

On Thu May 30, 2024 at 3:15 AM MSK, Samuel Holland wrote:
> Vector context management is the last thing done before jumping to C
> code, so it should be the first thing done after returning from C code.
> This also improves efficiency: riscv_v_context_nesting_end() clobbers
> the saved value of the status CSR, so currently ret_from_exception()
> must reload it. This is not necessary if riscv_v_context_nesting_end()
> is called first.

IIUC this patch do not improves efficiency by itself, because reload of CSR
stays in place.  What do think about applying here s1 register related changes
from the next patch?  Is it reasonable?  Or you can describe this patch in a
different way, like it makes preparations for efficiency improvements.

-- 
Best regards,
Matthew Bystrin <dev.mbstr at gmail.com>



More information about the linux-riscv mailing list