do_mmap: change addr to uintptr_t

Change-Id: I7df45e125387083aef7e62b046c20b7422f60f22
This commit is contained in:
Dominique Martinet
2018-09-20 13:08:58 +09:00
committed by Masamichi Takagi
parent c86d168165
commit 01fe83dcb3
4 changed files with 10 additions and 11 deletions

View File

@@ -465,7 +465,7 @@ static inline unsigned long timespec_to_jiffy(const struct timespec *ats)
void reset_cputime(void);
void set_cputime(int mode);
int do_munmap(void *addr, size_t len, int holding_memory_range_lock);
intptr_t do_mmap(intptr_t addr0, size_t len0, int prot, int flags, int fd,
intptr_t do_mmap(uintptr_t addr0, size_t len0, int prot, int flags, int fd,
off_t off0);
void clear_host_pte(uintptr_t addr, size_t len);
typedef int32_t key_t;

View File

@@ -1558,7 +1558,7 @@ int do_munmap(void *addr, size_t len, int holding_memory_range_lock)
return error;
}
static int search_free_space(size_t len, int pgshift, intptr_t *addrp)
static int search_free_space(size_t len, int pgshift, uintptr_t *addrp)
{
struct thread *thread = cpu_local_var(current);
struct vm_regions *region = &thread->vm->region;
@@ -1600,12 +1600,12 @@ out:
}
intptr_t
do_mmap(const intptr_t addr0, const size_t len0, const int prot,
do_mmap(const uintptr_t addr0, const size_t len0, const int prot,
const int flags, const int fd, const off_t off0)
{
struct thread *thread = cpu_local_var(current);
struct vm_regions *region = &thread->vm->region;
intptr_t addr = addr0;
uintptr_t addr = addr0;
size_t len = len0;
size_t populate_len = 0;
off_t off;
@@ -5229,7 +5229,7 @@ SYSCALL_DECLARE(shmat)
struct process_vm *vm = thread->vm;
size_t len;
int error;
intptr_t addr;
uintptr_t addr;
int prot;
int vrflags;
int req;
@@ -8105,8 +8105,7 @@ SYSCALL_DECLARE(mremap)
goto out;
}
need_relocate = 1;
error = search_free_space(newsize, range->pgshift,
(intptr_t *)&newstart);
error = search_free_space(newsize, range->pgshift, &newstart);
if (error) {
ekprintf("sys_mremap(%#lx,%#lx,%#lx,%#x,%#lx):"
"search failed. %d\n",