summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorHaojin Tang <[email protected]>2025-09-01 15:23:29 +0800
committerR b b666 <[email protected]>2025-09-01 18:44:24 +0800
commitdb4fb4c243195f43d5c29caf16f80d9e349c2e78 (patch)
treecf631376a07325411474ed26b3fcd50c220615e8 /libcpu
parent157d8096344089d6fd8c6de039e8799fbfd12cb9 (diff)
fix(risc-v, mmu): fix type mismatch of `_query`
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/risc-v/common64/mmu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libcpu/risc-v/common64/mmu.c b/libcpu/risc-v/common64/mmu.c
index 19c7f7c019..78f06be9be 100644
--- a/libcpu/risc-v/common64/mmu.c
+++ b/libcpu/risc-v/common64/mmu.c
@@ -525,17 +525,17 @@ void *rt_hw_mmu_v2p(struct rt_aspace *aspace, void *vaddr)
return (void *)paddr;
}
-static int _noncache(rt_base_t *pte)
+static int _noncache(rt_ubase_t *pte)
{
return 0;
}
-static int _cache(rt_base_t *pte)
+static int _cache(rt_ubase_t *pte)
{
return 0;
}
-static int (*control_handler[MMU_CNTL_DUMMY_END])(rt_base_t *pte)=
+static int (*control_handler[MMU_CNTL_DUMMY_END])(rt_ubase_t *pte)=
{
[MMU_CNTL_CACHE] = _cache,
[MMU_CNTL_NONCACHE] = _noncache,
@@ -565,14 +565,14 @@ int rt_hw_mmu_control(struct rt_aspace *aspace, void *vaddr, size_t size,
int err = -RT_EINVAL;
void *vend = vaddr + size;
- int (*handler)(rt_base_t *pte);
+ int (*handler)(rt_ubase_t *pte);
if (cmd >= 0 && cmd < MMU_CNTL_DUMMY_END)
{
handler = control_handler[cmd];
while (vaddr < vend)
{
- rt_base_t *pte = _query(aspace, vaddr, &level);
+ rt_ubase_t *pte = _query(aspace, vaddr, &level);
void *range_end = vaddr + _get_level_size(level);
RT_ASSERT(range_end <= vend);
@@ -755,4 +755,4 @@ void *rt_hw_mmu_pgtbl_create(void)
void rt_hw_mmu_pgtbl_delete(void *pgtbl)
{
rt_pages_free(pgtbl, 0);
-} \ No newline at end of file
+}