[PATCH 1/5] lib: sbi: factorize previous virtualization mode read from regs
Samuel Holland
samuel.holland at sifive.com
Thu Sep 12 15:42:46 PDT 2024
On 2024-09-12 7:10 AM, Clément Léger wrote:
> The same pattern is used at multiple places to verify in which mode
> the exception was actually taken. Factorize it.
>
> Signed-off-by: Clément Léger <cleger at rivosinc.com>
> ---
> include/sbi/sbi_trap.h | 9 +++++++++
> lib/sbi/sbi_emulate_csr.c | 12 ++----------
> lib/sbi/sbi_trap.c | 6 +-----
> 3 files changed, 12 insertions(+), 15 deletions(-)
Reviewed-by: Samuel Holland <samuel.holland at sifive.com>
More information about the opensbi
mailing list