Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm/pmap Cast pointer arguments of UVMHIST_CALLARGS() in...



details:   https://anonhg.NetBSD.org/src/rev/560d97dc5886
branches:  trunk
changeset: 943755:560d97dc5886
user:      rin <rin%NetBSD.org@localhost>
date:      Thu Sep 10 02:12:57 2020 +0000

description:
Cast pointer arguments of UVMHIST_CALLARGS() into uintptr_t.

Appease GCC9 -Wpointer-to-int-cast on ILP32 environments.

diffstat:

 sys/uvm/pmap/pmap_segtab.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r ffea239fec58 -r 560d97dc5886 sys/uvm/pmap/pmap_segtab.c
--- a/sys/uvm/pmap/pmap_segtab.c        Thu Sep 10 02:06:25 2020 +0000
+++ b/sys/uvm/pmap/pmap_segtab.c        Thu Sep 10 02:12:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_segtab.c,v 1.23 2020/08/22 15:34:51 skrll Exp $   */
+/*     $NetBSD: pmap_segtab.c,v 1.24 2020/09/10 02:12:57 rin Exp $     */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.23 2020/08/22 15:34:51 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.24 2020/09/10 02:12:57 rin Exp $");
 
 /*
  *     Manages physical address maps.
@@ -246,7 +246,7 @@
 {
        UVMHIST_FUNC(__func__);
 
-       UVMHIST_CALLARGS(pmapsegtabhist, "stp=%#jx", stp, 0, 0, 0);
+       UVMHIST_CALLARGS(pmapsegtabhist, "stp=%#jx", (uintptr_t)stp, 0, 0, 0);
 
        mutex_spin_enter(&pmap_segtab_lock);
        stp->seg_seg[0] = pmap_segtab_info.free_segtab;
@@ -346,7 +346,8 @@
                stp->seg_seg[0] = NULL;
                SEGTAB_ADD(nget, 1);
                found_on_freelist = true;
-               UVMHIST_CALLARGS(pmapsegtabhist, "freelist stp=%#jx", stp, 0, 0, 0);
+               UVMHIST_CALLARGS(pmapsegtabhist, "freelist stp=%#jx",
+                   (uintptr_t)stp, 0, 0, 0);
        }
        mutex_spin_exit(&pmap_segtab_lock);
 
@@ -364,7 +365,8 @@
                const paddr_t stp_pa = VM_PAGE_TO_PHYS(stp_pg);
 
                stp = (pmap_segtab_t *)PMAP_MAP_POOLPAGE(stp_pa);
-               UVMHIST_CALLARGS(pmapsegtabhist, "new stp=%#jx", stp, 0, 0, 0);
+               UVMHIST_CALLARGS(pmapsegtabhist, "new stp=%#jx",
+                   (uintptr_t)stp, 0, 0, 0);
                const size_t n = NBPG / sizeof(*stp);
                if (n > 1) {
                        /*
@@ -574,7 +576,7 @@
                KASSERT(pte == stp->seg_tab[(va >> SEGSHIFT) & (PMAP_SEGTABSIZE - 1)]);
                UVMHIST_CALLARGS(pmapsegtabhist, "pm=%#jx va=%#jx -> tab[%jd]=%jx",
                    (uintptr_t)pmap, (uintptr_t)va,
-                   (va >> SEGSHIFT) & (PMAP_SEGTABSIZE - 1), pte);
+                   (va >> SEGSHIFT) & (PMAP_SEGTABSIZE - 1), (uintptr_t)pte);
 
                pmap_check_ptes(pte, __func__);
                pte += (va >> PGSHIFT) & (NPTEPG - 1);



Home | Main Index | Thread Index | Old Index