summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorligr <[email protected]>2025-03-13 11:43:34 +0800
committerRbb666 <[email protected]>2025-03-17 17:40:55 +0800
commitb04aacbd9470e1aee0fe2dd0e6f06a520ea98d0d (patch)
treee721b8f1050db41f7ebae144199eccc240fa5e6a /libcpu
parent4f4544a440169ec3f96cc3e64420298a5b109c43 (diff)
[libcpu][risc-v]remove unused parameter 'size' for func _unmap_area.
Signed-off-by: ligr <[email protected]>
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/risc-v/common64/mmu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libcpu/risc-v/common64/mmu.c b/libcpu/risc-v/common64/mmu.c
index d349b669c8..db5a79b5a3 100644
--- a/libcpu/risc-v/common64/mmu.c
+++ b/libcpu/risc-v/common64/mmu.c
@@ -36,7 +36,7 @@
#define USER_VADDR_START 0
#endif
-static size_t _unmap_area(struct rt_aspace *aspace, void *v_addr, size_t size);
+static size_t _unmap_area(struct rt_aspace *aspace, void *v_addr);
static void *current_mmu_table = RT_NULL;
@@ -198,7 +198,7 @@ void *rt_hw_mmu_map(struct rt_aspace *aspace, void *v_addr, void *p_addr,
while (unmap_va != v_addr)
{
MM_PGTBL_LOCK(aspace);
- _unmap_area(aspace, unmap_va, ARCH_PAGE_SIZE);
+ _unmap_area(aspace, unmap_va);
MM_PGTBL_UNLOCK(aspace);
unmap_va += ARCH_PAGE_SIZE;
}
@@ -245,8 +245,8 @@ static void _unmap_pte(rt_ubase_t *pentry, rt_ubase_t *lvl_entry[], int level)
}
}
-/* Unmaps a virtual address range from the page table. */
-static size_t _unmap_area(struct rt_aspace *aspace, void *v_addr, size_t size)
+/* Unmaps a virtual address range (1GB/2MB/4KB according to actual page level) from the page table. */
+static size_t _unmap_area(struct rt_aspace *aspace, void *v_addr)
{
rt_ubase_t loop_va = __UMASKVALUE((rt_ubase_t)v_addr, PAGE_OFFSET_MASK);
size_t unmapped = 0;
@@ -315,7 +315,7 @@ void rt_hw_mmu_unmap(struct rt_aspace *aspace, void *v_addr, size_t size)
while (size > 0)
{
MM_PGTBL_LOCK(aspace);
- unmapped = _unmap_area(aspace, v_addr, size);
+ unmapped = _unmap_area(aspace, v_addr);
MM_PGTBL_UNLOCK(aspace);
/* when unmapped == 0, region not exist in pgtbl */