From b1d8c988bcca84cf7cd8ee5bf4fe528e256cfeab Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Sat, 16 Nov 2019 16:38:53 +0530 Subject: lib: No need to set VSSTATUS.MXR bit in get_insn() We don't need to set VSSTATUS.MXR bit in get_insn() for unpriv instruction read because MSTATUS.MXR bit applies to both "Stage1" and "Stage2" page tables. This also allows us to remove the "virt" parameter of get_insn() function. Signed-off-by: Anup Patel Reviewed-by: Atish Patra --- include/sbi/riscv_unpriv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sbi/riscv_unpriv.h b/include/sbi/riscv_unpriv.h index 05aca76e..bdea3a31 100644 --- a/include/sbi/riscv_unpriv.h +++ b/include/sbi/riscv_unpriv.h @@ -42,7 +42,7 @@ DECLARE_UNPRIVILEGED_LOAD_FUNCTION(u64) DECLARE_UNPRIVILEGED_STORE_FUNCTION(u64) DECLARE_UNPRIVILEGED_LOAD_FUNCTION(ulong) -ulong get_insn(ulong mepc, bool virt, struct sbi_scratch *scratch, +ulong get_insn(ulong mepc, struct sbi_scratch *scratch, struct unpriv_trap *trap); #endif -- cgit v1.3.1