acl: fix for loop initial declaration
[vpp.git] / src / svm / svmtool.c
index b319551..63577d9 100644 (file)
@@ -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)
@@ -368,7 +368,7 @@ repair (char *chroot_path, int crash_root_region)
 
   a->root_path = chroot_path;
   a->name = SVM_GLOBAL_REGION_NAME;
-  a->baseva = SVM_GLOBAL_REGION_BASEVA;
+  a->baseva = svm_get_global_region_base_va ();
   a->size = SVM_GLOBAL_REGION_SIZE;
   a->flags = SVM_FLAGS_NODATA;
 
@@ -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)