Fix remaining 32-bit compile issues
Change-Id: I9664214652229b663c3e3ba7406b4ede96bfb123
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/svm/svm.c b/src/svm/svm.c
index 97add5a..c96135c 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -491,7 +491,7 @@
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 @@
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 @@
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 b319551..01ae422 100644
--- a/src/svm/svmtool.c
+++ b/src/svm/svmtool.c
@@ -172,7 +172,7 @@
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 @@
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)