aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/svm.c11
-rw-r--r--src/svm/svmtool.c4
2 files changed, 8 insertions, 7 deletions
diff --git a/src/svm/svm.c b/src/svm/svm.c
index 97add5a786c..c96135cfd5b 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -491,7 +491,7 @@ svm_map_region (svm_map_region_args_t * a)
return (0);
}
- rp = mmap ((void *) a->baseva, a->size,
+ rp = mmap (uword_to_pointer (a->baseva, void *), a->size,
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, svm_fd, 0);
if (rp == (svm_region_t *) MAP_FAILED)
@@ -533,9 +533,10 @@ svm_map_region (svm_map_region_args_t * a)
rp->virtual_size = a->size;
rp->region_heap =
- mheap_alloc_with_flags ((void *) (a->baseva + MMAP_PAGESIZE),
- (a->pvt_heap_size != 0) ?
- a->pvt_heap_size : SVM_PVT_MHEAP_SIZE,
+ mheap_alloc_with_flags (uword_to_pointer
+ (a->baseva + MMAP_PAGESIZE, void *),
+ (a->pvt_heap_size !=
+ 0) ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE,
MHEAP_FLAG_DISABLE_VM);
oldheap = svm_push_pvt_heap (rp);
@@ -661,7 +662,7 @@ svm_map_region (svm_map_region_args_t * a)
a->size = rp->virtual_size;
munmap (rp, MMAP_PAGESIZE);
- rp = (void *) mmap ((void *) a->baseva, a->size,
+ rp = (void *) mmap (uword_to_pointer (a->baseva, void *), a->size,
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_FIXED, svm_fd, 0);
if ((uword) rp == (uword) MAP_FAILED)
diff --git a/src/svm/svmtool.c b/src/svm/svmtool.c
index b319551425c..01ae4221371 100644
--- a/src/svm/svmtool.c
+++ b/src/svm/svmtool.c
@@ -172,7 +172,7 @@ svm_map_region_nolock (svm_map_region_args_t * a)
a->size = rp->virtual_size;
munmap (rp, MMAP_PAGESIZE);
- rp = (void *) mmap ((void *) a->baseva, a->size,
+ rp = (void *) mmap (uword_to_pointer (a->baseva, void *), a->size,
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_FIXED, svm_fd, 0);
if ((uword) rp == (uword) MAP_FAILED)
@@ -401,7 +401,7 @@ repair (char *chroot_path, int crash_root_region)
a->size = root_rp->virtual_size;
munmap (root_rp, MMAP_PAGESIZE);
- root_rp = (void *) mmap ((void *) a->baseva, a->size,
+ root_rp = (void *) mmap (uword_to_pointer (a->baseva, void *), a->size,
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_FIXED, svm_fd, 0);
if ((uword) root_rp == (uword) MAP_FAILED)