X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fsvm%2Fsvmtool.c;h=6d1a2b1da49f79dcfe29cf28e03a58f8519e17fb;hb=85a3ddd4c854c6217272d8be031cfcb04d2e7685;hp=b319551425c92c7cd8405a1f6af49b879b4b8b15;hpb=7cd468a3d7dee7d6c92f69a0bb7061ae208ec727;p=vpp.git diff --git a/src/svm/svmtool.c b/src/svm/svmtool.c index b319551425c..6d1a2b1da49 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) @@ -190,7 +190,7 @@ svm_map_region_nolock (svm_map_region_args_t * a) { clib_warning ("rp->mutex LOCKED by pid %d, tag %d, cleared...", rp->mutex_owner_pid, rp->mutex_owner_tag); - memset (&rp->mutex, 0, sizeof (rp->mutex)); + clib_memset (&rp->mutex, 0, sizeof (rp->mutex)); } else @@ -339,7 +339,7 @@ subregion_repair (char *chroot_path) for (i = 0; i < vec_len (svm_names); i++) { - memset (&a, 0, sizeof (a)); + clib_memset (&a, 0, sizeof (a)); a.root_path = chroot_path; a.name = (char *) svm_names[i]; fformat (stdout, "Checking %s region...\n", a.name); @@ -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) @@ -422,7 +422,7 @@ repair (char *chroot_path, int crash_root_region) { clib_warning ("root_rp->mutex LOCKED by pid %d, tag %d, cleared...", root_rp->mutex_owner_pid, root_rp->mutex_owner_tag); - memset (&root_rp->mutex, 0, sizeof (root_rp->mutex)); + clib_memset (&root_rp->mutex, 0, sizeof (root_rp->mutex)); goto out; } else