Skip to content

Commit b04aacb

Browse files
GorrayLiRbb666
authored andcommitted
[libcpu][risc-v]remove unused parameter 'size' for func _unmap_area.
Signed-off-by: ligr <[email protected]>
1 parent 4f4544a commit b04aacb

File tree

1 file changed

+5
-5
lines changed
  • libcpu/risc-v/common64

1 file changed

+5
-5
lines changed

libcpu/risc-v/common64/mmu.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define USER_VADDR_START 0
3737
#endif
3838

39-
static size_t _unmap_area(struct rt_aspace *aspace, void *v_addr, size_t size);
39+
static size_t _unmap_area(struct rt_aspace *aspace, void *v_addr);
4040

4141
static void *current_mmu_table = RT_NULL;
4242

@@ -198,7 +198,7 @@ void *rt_hw_mmu_map(struct rt_aspace *aspace, void *v_addr, void *p_addr,
198198
while (unmap_va != v_addr)
199199
{
200200
MM_PGTBL_LOCK(aspace);
201-
_unmap_area(aspace, unmap_va, ARCH_PAGE_SIZE);
201+
_unmap_area(aspace, unmap_va);
202202
MM_PGTBL_UNLOCK(aspace);
203203
unmap_va += ARCH_PAGE_SIZE;
204204
}
@@ -245,8 +245,8 @@ static void _unmap_pte(rt_ubase_t *pentry, rt_ubase_t *lvl_entry[], int level)
245245
}
246246
}
247247

248-
/* Unmaps a virtual address range from the page table. */
249-
static size_t _unmap_area(struct rt_aspace *aspace, void *v_addr, size_t size)
248+
/* Unmaps a virtual address range (1GB/2MB/4KB according to actual page level) from the page table. */
249+
static size_t _unmap_area(struct rt_aspace *aspace, void *v_addr)
250250
{
251251
rt_ubase_t loop_va = __UMASKVALUE((rt_ubase_t)v_addr, PAGE_OFFSET_MASK);
252252
size_t unmapped = 0;
@@ -315,7 +315,7 @@ void rt_hw_mmu_unmap(struct rt_aspace *aspace, void *v_addr, size_t size)
315315
while (size > 0)
316316
{
317317
MM_PGTBL_LOCK(aspace);
318-
unmapped = _unmap_area(aspace, v_addr, size);
318+
unmapped = _unmap_area(aspace, v_addr);
319319
MM_PGTBL_UNLOCK(aspace);
320320

321321
/* when unmapped == 0, region not exist in pgtbl */

0 commit comments

Comments
 (0)