qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 4/5] target/riscv: Rename pmp_is_range_in_tlb


From: LIU Zhiwei
Subject: [PATCH v2 4/5] target/riscv: Rename pmp_is_range_in_tlb
Date: Mon, 22 Nov 2021 19:02:29 +0800

Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
---
 target/riscv/cpu_helper.c | 2 +-
 target/riscv/pmp.c        | 2 +-
 target/riscv/pmp.h        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c
index 3f53744897..cf8109197d 100644
--- a/target/riscv/cpu_helper.c
+++ b/target/riscv/cpu_helper.c
@@ -376,7 +376,7 @@ static int get_physical_address_pmp(CPURISCVState *env, int 
*prot,
 
     *prot = pmp_priv_to_page_prot(pmp_priv);
     if (tlb_size != NULL) {
-        pmp_is_range_in_tlb(env, addr & ~(*tlb_size - 1), tlb_size);
+        pmp_adjust_tlb_size(env, addr & ~(*tlb_size - 1), tlb_size);
     }
 
     return TRANSLATE_SUCCESS;
diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c
index 4850a9cc5d..19baf87384 100644
--- a/target/riscv/pmp.c
+++ b/target/riscv/pmp.c
@@ -620,7 +620,7 @@ static target_ulong pmp_get_tlb_size(CPURISCVState *env, 
int pmp_index,
  * Check is there a PMP entry which range covers this page. If so,
  * try to find the minimum granularity for the TLB size.
  */
-void pmp_is_range_in_tlb(CPURISCVState *env, hwaddr tlb_sa,
+void pmp_adjust_tlb_size(CPURISCVState *env, hwaddr tlb_sa,
                          target_ulong *tlb_size)
 {
     int i;
diff --git a/target/riscv/pmp.h b/target/riscv/pmp.h
index 69395472f9..600ac65d08 100644
--- a/target/riscv/pmp.h
+++ b/target/riscv/pmp.h
@@ -71,7 +71,7 @@ target_ulong pmpaddr_csr_read(CPURISCVState *env, uint32_t 
addr_index);
 bool pmp_hart_has_privs(CPURISCVState *env, target_ulong addr,
     target_ulong size, pmp_priv_t privs, pmp_priv_t *allowed_privs,
     target_ulong mode);
-void pmp_is_range_in_tlb(CPURISCVState *env, hwaddr tlb_sa,
+void pmp_adjust_tlb_size(CPURISCVState *env, hwaddr tlb_sa,
                          target_ulong *tlb_size);
 void pmp_update_rule_addr(CPURISCVState *env, uint32_t pmp_index);
 void pmp_update_rule_nums(CPURISCVState *env);
-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]