From 240b363618bdd981333e8ebbb1cb09e702315b0a Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Tue, 16 Aug 2022 16:23:21 -0700 Subject: target/riscv: Remove additional priv version check for mcountinhibit With .min_priv_version, additiona priv version check is uncessary for mcountinhibit read/write functions. Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Reviewed-by: Alistair Francis Signed-off-by: Atish Patra Message-Id: <20220816232321.558250-7-atishp@rivosinc.com> Signed-off-by: Alistair Francis --- target/riscv/csr.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'target/riscv') diff --git a/target/riscv/csr.c b/target/riscv/csr.c index d81f466..4a7078f 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -1494,10 +1494,6 @@ static RISCVException write_mtvec(CPURISCVState *env, int csrno, static RISCVException read_mcountinhibit(CPURISCVState *env, int csrno, target_ulong *val) { - if (env->priv_ver < PRIV_VERSION_1_11_0) { - return RISCV_EXCP_ILLEGAL_INST; - } - *val = env->mcountinhibit; return RISCV_EXCP_NONE; } @@ -1508,10 +1504,6 @@ static RISCVException write_mcountinhibit(CPURISCVState *env, int csrno, int cidx; PMUCTRState *counter; - if (env->priv_ver < PRIV_VERSION_1_11_0) { - return RISCV_EXCP_ILLEGAL_INST; - } - env->mcountinhibit = val; /* Check if any other counter is also monitoring cycles/instructions */ -- cgit v1.1