Module Name: src
Committed By: rin
Date: Mon Feb 24 12:38:58 UTC 2020
Modified Files:
src/sys/arch/arm/arm32: fault.c
src/sys/arch/arm/at91: at91pmc.c
src/sys/dev/fdt: fdt_subr.c
src/sys/dev/tprof: tprof_armv7.c
src/sys/dev/usb: if_axe.c
src/sys/uvm: uvm_amap.c uvm_anon.c uvm_aobj.c uvm_device.c uvm_fault.c
uvm_km.c uvm_pager.c
Log Message:
0x%#x --> %#x for non-external codes.
Also, stop mixing up 0x%x and %#x in single files as far as possible.
To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/arch/arm/arm32/fault.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/at91/at91pmc.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/fdt/fdt_subr.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/tprof/tprof_armv7.c
cvs rdiff -u -r1.122 -r1.123 src/sys/dev/usb/if_axe.c
cvs rdiff -u -r1.115 -r1.116 src/sys/uvm/uvm_amap.c
cvs rdiff -u -r1.73 -r1.74 src/sys/uvm/uvm_anon.c
cvs rdiff -u -r1.135 -r1.136 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.69 -r1.70 src/sys/uvm/uvm_device.c
cvs rdiff -u -r1.216 -r1.217 src/sys/uvm/uvm_fault.c
cvs rdiff -u -r1.155 -r1.156 src/sys/uvm/uvm_km.c
cvs rdiff -u -r1.122 -r1.123 src/sys/uvm/uvm_pager.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/arm32/fault.c
diff -u src/sys/arch/arm/arm32/fault.c:1.109 src/sys/arch/arm/arm32/fault.c:1.110
--- src/sys/arch/arm/arm32/fault.c:1.109 Fri Nov 29 17:33:43 2019
+++ src/sys/arch/arm/arm32/fault.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.109 2019/11/29 17:33:43 ryo Exp $ */
+/* $NetBSD: fault.c,v 1.110 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
#include "opt_kgdb.h"
#include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.109 2019/11/29 17:33:43 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.110 2020/02/24 12:38:57 rin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -835,7 +835,7 @@ prefetch_abort_handler(trapframe_t *tf)
/* Get fault address */
fault_pc = tf->tf_pc;
KASSERTMSG(tf == lwp_trapframe(l), "tf %p vs %p", tf, lwp_trapframe(l));
- UVMHIST_LOG(maphist, " (pc=0x%jx, l=0x%#jx, tf=0x%#jx)",
+ UVMHIST_LOG(maphist, " (pc=%#jx, l=%#jx, tf=%#jx)",
fault_pc, (uintptr_t)l, (uintptr_t)tf, 0);
#ifdef THUMB_CODE
Index: src/sys/arch/arm/at91/at91pmc.c
diff -u src/sys/arch/arm/at91/at91pmc.c:1.7 src/sys/arch/arm/at91/at91pmc.c:1.8
--- src/sys/arch/arm/at91/at91pmc.c:1.7 Thu Apr 11 14:38:05 2019
+++ src/sys/arch/arm/at91/at91pmc.c Mon Feb 24 12:38:57 2020
@@ -1,5 +1,5 @@
-/* $Id: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $ */
-/* $NetBSD: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $ */
+/* $Id: at91pmc.c,v 1.8 2020/02/24 12:38:57 rin Exp $ */
+/* $NetBSD: at91pmc.c,v 1.8 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91pmc.c,v 1.8 2020/02/24 12:38:57 rin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -56,10 +56,10 @@ at91pmc_get_clocks(struct at91bus_clocks
uint32_t reg;
if (!((reg = PMCREG(PMC_MOR)) & PMC_MOR_MOSCEN))
- panic("%s: main oscillator not enabled (MOR=0x%#X)", __FUNCTION__, reg);
+ panic("%s: main oscillator not enabled (MOR=%#X)", __FUNCTION__, reg);
if (!((reg = PMCREG(PMC_MCFR)) & PMC_MCFR_MAINRDY))
- panic("%s: main oscillator not ready (MCFR=0x%#X)", __FUNCTION__, reg);
+ panic("%s: main oscillator not ready (MCFR=%#X)", __FUNCTION__, reg);
mclk = ((reg & PMC_MCFR_MAINF) * SLOW_CLOCK) / 16U;
Index: src/sys/dev/fdt/fdt_subr.c
diff -u src/sys/dev/fdt/fdt_subr.c:1.34 src/sys/dev/fdt/fdt_subr.c:1.35
--- src/sys/dev/fdt/fdt_subr.c:1.34 Thu Feb 20 01:35:55 2020
+++ src/sys/dev/fdt/fdt_subr.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_subr.c,v 1.34 2020/02/20 01:35:55 jmcneill Exp $ */
+/* $NetBSD: fdt_subr.c,v 1.35 2020/02/24 12:38:57 rin Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.34 2020/02/20 01:35:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.35 2020/02/24 12:38:57 rin Exp $");
#include "opt_fdt.h"
@@ -243,7 +243,7 @@ fdtbus_decode_range(int phandle, uint64_
buf += size_cells * 4;
#ifdef FDTBUS_DEBUG
- printf("%s: %s: cba=0x%#" PRIx64 ", pba=0x%#" PRIx64 ", cl=0x%#" PRIx64 "\n", __func__, fdt_get_name(fdtbus_get_data(), fdtbus_phandle2offset(phandle), NULL), cba, pba, cl);
+ printf("%s: %s: cba=%#" PRIx64 ", pba=%#" PRIx64 ", cl=%#" PRIx64 "\n", __func__, fdt_get_name(fdtbus_get_data(), fdtbus_phandle2offset(phandle), NULL), cba, pba, cl);
#endif
if (paddr >= cba && paddr < cba + cl)
Index: src/sys/dev/tprof/tprof_armv7.c
diff -u src/sys/dev/tprof/tprof_armv7.c:1.2 src/sys/dev/tprof/tprof_armv7.c:1.3
--- src/sys/dev/tprof/tprof_armv7.c:1.2 Mon Jul 16 10:56:42 2018
+++ src/sys/dev/tprof/tprof_armv7.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_armv7.c,v 1.2 2018/07/16 10:56:42 jmcneill Exp $ */
+/* $NetBSD: tprof_armv7.c,v 1.3 2020/02/24 12:38:57 rin Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tprof_armv7.c,v 1.2 2018/07/16 10:56:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_armv7.c,v 1.3 2020/02/24 12:38:57 rin Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -173,7 +173,7 @@ armv7_pmu_start(const tprof_param_t *par
uint64_t xc;
if (!armv7_pmu_event_implemented(param->p_event)) {
- printf("%s: event 0x%#llx not implemented on this CPU\n",
+ printf("%s: event %#llx not implemented on this CPU\n",
__func__, param->p_event);
return EINVAL;
}
Index: src/sys/dev/usb/if_axe.c
diff -u src/sys/dev/usb/if_axe.c:1.122 src/sys/dev/usb/if_axe.c:1.123
--- src/sys/dev/usb/if_axe.c:1.122 Wed Jan 29 06:24:10 2020
+++ src/sys/dev/usb/if_axe.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axe.c,v 1.122 2020/01/29 06:24:10 thorpej Exp $ */
+/* $NetBSD: if_axe.c,v 1.123 2020/02/24 12:38:57 rin Exp $ */
/* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
/*
@@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.122 2020/01/29 06:24:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.123 2020/02/24 12:38:57 rin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -321,7 +321,7 @@ axe_mii_read_reg(struct usbnet *un, int
usbd_status err;
uint16_t data;
- DPRINTFN(30, "phy 0x%jx reg 0x%jx\n", phy, reg, 0, 0);
+ DPRINTFN(30, "phy %#jx reg %#jx\n", phy, reg, 0, 0);
if (un->un_phyno != phy)
return EINVAL;
@@ -347,7 +347,7 @@ axe_mii_read_reg(struct usbnet *un, int
*val &= ~BMSR_EXTCAP;
}
- DPRINTFN(30, "phy 0x%jx reg 0x%jx val %#jx", phy, reg, *val, 0);
+ DPRINTFN(30, "phy %#jx reg %#jx val %#jx", phy, reg, *val, 0);
return 0;
}
@@ -417,7 +417,7 @@ axe_mii_statchg(struct ifnet *ifp)
}
}
- DPRINTF("val=0x%jx", val, 0, 0, 0);
+ DPRINTF("val=%#jx", val, 0, 0, 0);
usbnet_lock_mii(un);
err = axe_cmd(sc, AXE_CMD_WRITE_MEDIA, 0, val, NULL);
usbnet_unlock_mii(un);
@@ -597,7 +597,7 @@ axe_ax88178_init(struct axe_softc *sc)
eeprom = le16toh(eeprom);
- DPRINTF("EEPROM is 0x%jx", eeprom, 0, 0, 0);
+ DPRINTF("EEPROM is %#jx", eeprom, 0, 0, 0);
/* if EEPROM is invalid we have to use to GPIO0 */
if (eeprom == 0xffff) {
@@ -1040,7 +1040,7 @@ axe_rx_loop(struct usbnet * un, struct u
memcpy(&hdr, buf, sizeof(hdr));
- DPRINTFN(20, "total_len %#jx len %jx ilen %#jx",
+ DPRINTFN(20, "total_len %#jx len %#jx ilen %#jx",
total_len,
(le16toh(hdr.len) & AXE_RH1M_RXLEN_MASK),
(le16toh(hdr.ilen) & AXE_RH1M_RXLEN_MASK), 0);
@@ -1331,7 +1331,7 @@ axe_init_locked(struct ifnet *ifp)
if (ifp->if_flags & IFF_BROADCAST)
rxmode |= AXE_RXCMD_BROADCAST;
- DPRINTF("rxmode 0x%#jx", rxmode, 0, 0, 0);
+ DPRINTF("rxmode %#jx", rxmode, 0, 0, 0);
axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL);
Index: src/sys/uvm/uvm_amap.c
diff -u src/sys/uvm/uvm_amap.c:1.115 src/sys/uvm/uvm_amap.c:1.116
--- src/sys/uvm/uvm_amap.c:1.115 Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_amap.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_amap.c,v 1.115 2020/02/23 15:46:43 ad Exp $ */
+/* $NetBSD: uvm_amap.c,v 1.116 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.115 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.116 2020/02/24 12:38:57 rin Exp $");
#include "opt_uvmhist.h"
@@ -246,7 +246,7 @@ amap_alloc(vaddr_t sz, vaddr_t padsz, in
amap->am_maxslot * sizeof(struct vm_anon *));
}
- UVMHIST_LOG(maphist,"<- done, amap = 0x%#jx, sz=%jd", (uintptr_t)amap,
+ UVMHIST_LOG(maphist,"<- done, amap = %#jx, sz=%jd", (uintptr_t)amap,
sz, 0, 0);
return(amap);
}
@@ -333,7 +333,7 @@ amap_free(struct vm_amap *amap)
kmem_free(amap->am_ppref, slots * sizeof(*amap->am_ppref));
#endif
pool_cache_put(&uvm_amap_cache, amap);
- UVMHIST_LOG(maphist,"<- done, freed amap = 0x%#jx", (uintptr_t)amap,
+ UVMHIST_LOG(maphist,"<- done, freed amap = %#jx", (uintptr_t)amap,
0, 0, 0);
}
@@ -364,7 +364,7 @@ amap_extend(struct vm_map_entry *entry,
UVMHIST_FUNC("amap_extend"); UVMHIST_CALLED(maphist);
- UVMHIST_LOG(maphist, " (entry=0x%#jx, addsize=0x%jx, flags=0x%jx)",
+ UVMHIST_LOG(maphist, " (entry=%#jx, addsize=%#jx, flags=%#jx)",
(uintptr_t)entry, addsize, flags, 0);
/*
@@ -404,7 +404,7 @@ amap_extend(struct vm_map_entry *entry,
#endif
uvm_anon_freelst(amap, tofree);
UVMHIST_LOG(maphist,
- "<- done (case 1f), amap = 0x%#jx, sltneed=%jd",
+ "<- done (case 1f), amap = %#jx, sltneed=%jd",
(uintptr_t)amap, slotneed, 0, 0);
return 0;
}
@@ -420,7 +420,7 @@ amap_extend(struct vm_map_entry *entry,
#endif
uvm_anon_freelst(amap, tofree);
UVMHIST_LOG(maphist,
- "<- done (case 1b), amap = 0x%#jx, sltneed=%jd",
+ "<- done (case 1b), amap = %#jx, sltneed=%jd",
(uintptr_t)amap, slotneed, 0, 0);
return 0;
}
@@ -453,7 +453,7 @@ amap_extend(struct vm_map_entry *entry,
* alloc time and we never shrink an allocation.
*/
- UVMHIST_LOG(maphist,"<- done (case 2f), amap = 0x%#jx, "
+ UVMHIST_LOG(maphist,"<- done (case 2f), amap = %#jx, "
"slotneed=%jd", (uintptr_t)amap, slotneed, 0, 0);
return 0;
} else {
@@ -510,7 +510,7 @@ amap_extend(struct vm_map_entry *entry,
entry->aref.ar_pageoff = slotarea - slotadd;
amap_unlock(amap);
- UVMHIST_LOG(maphist,"<- done (case 2b), amap = 0x%#jx, "
+ UVMHIST_LOG(maphist,"<- done (case 2b), amap = %#jx, "
"slotneed=%jd", (uintptr_t)amap, slotneed, 0, 0);
return 0;
}
@@ -656,7 +656,7 @@ amap_extend(struct vm_map_entry *entry,
if (oldppref && oldppref != PPREF_NONE)
kmem_free(oldppref, oldnslots * sizeof(*oldppref));
#endif
- UVMHIST_LOG(maphist,"<- done (case 3), amap = 0x%#jx, slotneed=%jd",
+ UVMHIST_LOG(maphist,"<- done (case 3), amap = %#jx, slotneed=%jd",
(uintptr_t)amap, slotneed, 0, 0);
return 0;
}
@@ -731,7 +731,7 @@ amap_wipeout(struct vm_amap *amap)
u_int lcv;
UVMHIST_FUNC("amap_wipeout"); UVMHIST_CALLED(maphist);
- UVMHIST_LOG(maphist,"(amap=0x%#jx)", (uintptr_t)amap, 0,0,0);
+ UVMHIST_LOG(maphist,"(amap=%#jx)", (uintptr_t)amap, 0,0,0);
KASSERT(rw_write_held(amap->am_lock));
KASSERT(amap->am_ref == 0);
@@ -753,7 +753,7 @@ amap_wipeout(struct vm_amap *amap)
KASSERT(anon != NULL && anon->an_ref != 0);
KASSERT(anon->an_lock == amap->am_lock);
- UVMHIST_LOG(maphist," processing anon 0x%#jx, ref=%jd",
+ UVMHIST_LOG(maphist," processing anon %#jx, ref=%jd",
(uintptr_t)anon, anon->an_ref, 0, 0);
/*
@@ -834,8 +834,7 @@ amap_copy(struct vm_map *map, struct vm_
startva = (startva / chunksize) * chunksize;
endva = roundup(endva, chunksize);
UVMHIST_LOG(maphist,
- " chunk amap ==> clip 0x%jx->0x%jx to "
- "0x%jx->0x%jx",
+ " chunk amap ==> clip %#jx->%#jx to %#jx->%#jx",
entry->start, entry->end, startva, endva);
UVM_MAP_CLIP_START(map, entry, startva);
@@ -850,7 +849,7 @@ amap_copy(struct vm_map *map, struct vm_
return;
}
- UVMHIST_LOG(maphist, "<- done [creating new amap 0x%jx->0x%jx]",
+ UVMHIST_LOG(maphist, "<- done [creating new amap %#jx->%#jx]",
entry->start, entry->end, 0, 0);
/*
@@ -1441,7 +1440,7 @@ amap_lookup(struct vm_aref *aref, vaddr_
an = amap->am_anon[slot];
UVMHIST_LOG(maphist,
- "<- done (amap=0x%#jx, offset=0x%jx, result=0x%#jx)",
+ "<- done (amap=%#jx, offset=%#jx, result=%#jx)",
(uintptr_t)amap, offset, (uintptr_t)an, 0);
KASSERT(slot < amap->am_nslot);
@@ -1527,7 +1526,7 @@ amap_add(struct vm_aref *aref, vaddr_t o
}
amap->am_anon[slot] = anon;
UVMHIST_LOG(maphist,
- "<- done (amap=0x%#jx, offset=0x%x, anon=0x%#jx, rep=%d)",
+ "<- done (amap=%#jx, offset=%#x, anon=%#jx, rep=%d)",
(uintptr_t)amap, offset, (uintptr_t)anon, replace);
}
@@ -1561,7 +1560,7 @@ amap_unadd(struct vm_aref *aref, vaddr_t
amap->am_bckptr[amap->am_slots[ptr]] = ptr;
}
amap->am_nused--;
- UVMHIST_LOG(maphist, "<- done (amap=0x%#jx, slot=0x%jx)",
+ UVMHIST_LOG(maphist, "<- done (amap=%#jx, slot=%#jx)",
(uintptr_t)amap, slot,0, 0);
}
@@ -1619,7 +1618,7 @@ amap_ref(struct vm_amap *amap, vaddr_t o
}
amap_adjref_anons(amap, offset, len, 1, (flags & AMAP_REFALL) != 0);
- UVMHIST_LOG(maphist,"<- done! amap=0x%#jx", (uintptr_t)amap, 0, 0, 0);
+ UVMHIST_LOG(maphist,"<- done! amap=%#jx", (uintptr_t)amap, 0, 0, 0);
}
/*
@@ -1636,7 +1635,7 @@ amap_unref(struct vm_amap *amap, vaddr_t
amap_lock(amap, RW_WRITER);
- UVMHIST_LOG(maphist," amap=0x%#jx refs=%d, nused=%d",
+ UVMHIST_LOG(maphist," amap=%#jx refs=%d, nused=%d",
(uintptr_t)amap, amap->am_ref, amap->am_nused, 0);
KASSERT(amap->am_ref > 0);
Index: src/sys/uvm/uvm_anon.c
diff -u src/sys/uvm/uvm_anon.c:1.73 src/sys/uvm/uvm_anon.c:1.74
--- src/sys/uvm/uvm_anon.c:1.73 Sun Feb 23 21:36:29 2020
+++ src/sys/uvm/uvm_anon.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_anon.c,v 1.73 2020/02/23 21:36:29 ad Exp $ */
+/* $NetBSD: uvm_anon.c,v 1.74 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.73 2020/02/23 21:36:29 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.74 2020/02/24 12:38:57 rin Exp $");
#include "opt_uvmhist.h"
@@ -106,7 +106,7 @@ uvm_anon_dispose(struct vm_anon *anon)
struct vm_page *pg = anon->an_page;
UVMHIST_FUNC("uvm_anon_dispose"); UVMHIST_CALLED(maphist);
- UVMHIST_LOG(maphist,"(anon=0x%#jx)", (uintptr_t)anon, 0,0,0);
+ UVMHIST_LOG(maphist,"(anon=%#jx)", (uintptr_t)anon, 0,0,0);
KASSERT(rw_write_held(anon->an_lock));
@@ -161,7 +161,7 @@ uvm_anon_dispose(struct vm_anon *anon)
return false;
}
uvm_pagefree(pg);
- UVMHIST_LOG(maphist, "anon 0x%#jx, page 0x%#jx: "
+ UVMHIST_LOG(maphist, "anon %#jx, page %#jx: "
"freed now!", (uintptr_t)anon, (uintptr_t)pg,
0, 0);
}
@@ -384,7 +384,7 @@ uvm_anon_dropswap(struct vm_anon *anon)
if (anon->an_swslot == 0)
return;
- UVMHIST_LOG(maphist,"freeing swap for anon %#jx, paged to swslot 0x%jx",
+ UVMHIST_LOG(maphist,"freeing swap for anon %#jx, paged to swslot %#jx",
(uintptr_t)anon, anon->an_swslot, 0, 0);
uvm_swap_free(anon->an_swslot, 1);
anon->an_swslot = 0;
Index: src/sys/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.135 src/sys/uvm/uvm_aobj.c:1.136
--- src/sys/uvm/uvm_aobj.c:1.135 Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_aobj.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_aobj.c,v 1.135 2020/02/23 15:46:43 ad Exp $ */
+/* $NetBSD: uvm_aobj.c,v 1.136 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.135 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.136 2020/02/24 12:38:57 rin Exp $");
#ifdef _KERNEL_OPT
#include "opt_uvmhist.h"
@@ -593,7 +593,7 @@ uao_detach(struct uvm_object *uobj)
*/
KASSERT(uobj->uo_refs > 0);
- UVMHIST_LOG(maphist," (uobj=0x%#jx) ref=%jd",
+ UVMHIST_LOG(maphist," (uobj=%#jx) ref=%jd",
(uintptr_t)uobj, uobj->uo_refs, 0, 0);
if (atomic_dec_uint_nv(&uobj->uo_refs) > 0) {
UVMHIST_LOG(maphist, "<- done (rc>0)", 0,0,0,0);
@@ -681,14 +681,14 @@ uao_put(struct uvm_object *uobj, voff_t
}
if (stop > (uint64_t)(aobj->u_pages << PAGE_SHIFT)) {
printf("uao_put: strange, got an out of range "
- "flush 0x%jx > 0x%jx (fixed)\n",
+ "flush %#jx > %#jx (fixed)\n",
(uintmax_t)stop,
(uintmax_t)(aobj->u_pages << PAGE_SHIFT));
stop = aobj->u_pages << PAGE_SHIFT;
}
}
UVMHIST_LOG(maphist,
- " flush start=0x%jx, stop=0x%jx, flags=0x%jx",
+ " flush start=%#jx, stop=%#jx, flags=%#jx",
start, stop, flags, 0);
/*
@@ -966,7 +966,7 @@ gotpage:
if ((ptmp->flags & PG_BUSY) != 0) {
ptmp->flags |= PG_WANTED;
UVMHIST_LOG(pdhist,
- "sleeping, ptmp->flags 0x%jx\n",
+ "sleeping, ptmp->flags %#jx\n",
ptmp->flags,0,0,0);
UVM_UNLOCK_AND_WAIT_RW(ptmp, uobj->vmobjlock,
false, "uao_get", 0);
Index: src/sys/uvm/uvm_device.c
diff -u src/sys/uvm/uvm_device.c:1.69 src/sys/uvm/uvm_device.c:1.70
--- src/sys/uvm/uvm_device.c:1.69 Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_device.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_device.c,v 1.69 2020/02/23 15:46:43 ad Exp $ */
+/* $NetBSD: uvm_device.c,v 1.70 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.69 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.70 2020/02/24 12:38:57 rin Exp $");
#include "opt_uvmhist.h"
@@ -116,7 +116,7 @@ udv_attach(dev_t device, vm_prot_t acces
UVMHIST_FUNC("udv_attach"); UVMHIST_CALLED(maphist);
- UVMHIST_LOG(maphist, "(device=0x%jx)", device,0,0,0);
+ UVMHIST_LOG(maphist, "(device=%#jx)", device,0,0,0);
/*
* before we do anything, ensure this device supports mmap
@@ -273,7 +273,7 @@ udv_reference(struct uvm_object *uobj)
rw_enter(uobj->vmobjlock, RW_WRITER);
uobj->uo_refs++;
- UVMHIST_LOG(maphist, "<- done (uobj=0x%#jx, ref = %jd)",
+ UVMHIST_LOG(maphist, "<- done (uobj=%#jx, ref = %jd)",
(uintptr_t)uobj, uobj->uo_refs,0,0);
rw_exit(uobj->vmobjlock);
}
@@ -300,7 +300,7 @@ again:
if (uobj->uo_refs > 1) {
uobj->uo_refs--;
rw_exit(uobj->vmobjlock);
- UVMHIST_LOG(maphist," <- done, uobj=0x%#jx, ref=%jd",
+ UVMHIST_LOG(maphist," <- done, uobj=%#jx, ref=%jd",
(uintptr_t)uobj,uobj->uo_refs,0,0);
return;
}
@@ -329,7 +329,7 @@ again:
uvm_obj_destroy(uobj, true);
kmem_free(udv, sizeof(*udv));
- UVMHIST_LOG(maphist," <- done, freed uobj=0x%#jx", (uintptr_t)uobj,
+ UVMHIST_LOG(maphist," <- done, freed uobj=%#jx", (uintptr_t)uobj,
0, 0, 0);
}
@@ -373,7 +373,7 @@ udv_fault(struct uvm_faultinfo *ufi, vad
*/
if (UVM_ET_ISCOPYONWRITE(entry)) {
- UVMHIST_LOG(maphist, "<- failed -- COW entry (etype=0x%jx)",
+ UVMHIST_LOG(maphist, "<- failed -- COW entry (etype=%#jx)",
entry->etype, 0,0,0);
uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj);
return(EIO);
@@ -424,7 +424,7 @@ udv_fault(struct uvm_faultinfo *ufi, vad
mmapflags = pmap_mmap_flags(mdpgno);
mapprot = ufi->entry->protection;
UVMHIST_LOG(maphist,
- " MAPPING: device: pm=0x%#jx, va=0x%jx, pa=0x%jx, at=%jd",
+ " MAPPING: device: pm=%#jx, va=%#jx, pa=%#jx, at=%jd",
(uintptr_t)ufi->orig_map->pmap, curr_va, paddr, mapprot);
if (pmap_enter(ufi->orig_map->pmap, curr_va, paddr, mapprot,
PMAP_CANFAIL | mapprot | mmapflags) != 0) {
Index: src/sys/uvm/uvm_fault.c
diff -u src/sys/uvm/uvm_fault.c:1.216 src/sys/uvm/uvm_fault.c:1.217
--- src/sys/uvm/uvm_fault.c:1.216 Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_fault.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_fault.c,v 1.216 2020/02/23 15:46:43 ad Exp $ */
+/* $NetBSD: uvm_fault.c,v 1.217 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.216 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.217 2020/02/24 12:38:57 rin Exp $");
#include "opt_uvmhist.h"
@@ -953,7 +953,7 @@ uvm_fault_check(
*/
if (uvmfault_lookup(ufi, false) == false) {
- UVMHIST_LOG(maphist, "<- no mapping @ 0x%#jx", ufi->orig_rvaddr,
+ UVMHIST_LOG(maphist, "<- no mapping @ %#jx", ufi->orig_rvaddr,
0,0,0);
return EFAULT;
}
@@ -964,7 +964,7 @@ uvm_fault_check(
printf("Page fault on non-pageable map:\n");
printf("ufi->map = %p\n", ufi->map);
printf("ufi->orig_map = %p\n", ufi->orig_map);
- printf("ufi->orig_rvaddr = 0x%lx\n", (u_long) ufi->orig_rvaddr);
+ printf("ufi->orig_rvaddr = %#lx\n", (u_long) ufi->orig_rvaddr);
panic("uvm_fault: (ufi->map->flags & VM_MAP_PAGEABLE) == 0");
}
#endif
@@ -1817,7 +1817,7 @@ uvm_fault_lower_lookup(
*/
if (lcv == flt->centeridx) {
- UVMHIST_LOG(maphist, " got uobjpage (0x%#jx) "
+ UVMHIST_LOG(maphist, " got uobjpage (%#jx) "
"with locked get", (uintptr_t)curpg, 0, 0, 0);
} else {
uvm_fault_lower_neighbor(ufi, flt, currva, curpg);
@@ -2190,7 +2190,7 @@ uvm_fault_lower_promote(
UVM_PAGE_OWN(uobjpage, NULL);
UVMHIST_LOG(maphist,
- " promote uobjpage 0x%#jx to anon/page 0x%#jx/0x%#jx",
+ " promote uobjpage %#jx to anon/page %#jx/%#jx",
(uintptr_t)uobjpage, (uintptr_t)anon, (uintptr_t)pg, 0);
} else {
@@ -2201,7 +2201,7 @@ uvm_fault_lower_promote(
* uvmfault_promote().
*/
- UVMHIST_LOG(maphist," zero fill anon/page 0x%#jx/0%#jx",
+ UVMHIST_LOG(maphist," zero fill anon/page %#jx/%#jx",
(uintptr_t)anon, (uintptr_t)pg, 0, 0);
}
Index: src/sys/uvm/uvm_km.c
diff -u src/sys/uvm/uvm_km.c:1.155 src/sys/uvm/uvm_km.c:1.156
--- src/sys/uvm/uvm_km.c:1.155 Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_km.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_km.c,v 1.155 2020/02/23 15:46:43 ad Exp $ */
+/* $NetBSD: uvm_km.c,v 1.156 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -152,7 +152,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.155 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.156 2020/02/24 12:38:57 rin Exp $");
#include "opt_uvmhist.h"
@@ -557,7 +557,7 @@ uvm_km_check_empty(struct vm_map *map, v
paddr_t pa;
if (pmap_extract(pmap_kernel(), va, &pa)) {
- panic("uvm_km_check_empty: va %p has pa 0x%llx",
+ panic("uvm_km_check_empty: va %p has pa %#llx",
(void *)va, (long long)pa);
}
/*
@@ -620,7 +620,7 @@ uvm_km_alloc(struct vm_map *map, vsize_t
kva = vm_map_min(map); /* hint */
size = round_page(size);
obj = (flags & UVM_KMF_PAGEABLE) ? uvm_kernel_object : NULL;
- UVMHIST_LOG(maphist," (map=0x%#jx, obj=0x%#jx, size=0x%jx, flags=%jd)",
+ UVMHIST_LOG(maphist," (map=%#jx, obj=%#jx, size=%#jx, flags=%jd)",
(uintptr_t)map, (uintptr_t)obj, size, flags);
/*
@@ -642,7 +642,7 @@ uvm_km_alloc(struct vm_map *map, vsize_t
*/
if (flags & (UVM_KMF_VAONLY | UVM_KMF_PAGEABLE)) {
- UVMHIST_LOG(maphist,"<- done valloc (kva=0x%jx)", kva,0,0,0);
+ UVMHIST_LOG(maphist,"<- done valloc (kva=%#jx)", kva,0,0,0);
return(kva);
}
@@ -651,7 +651,7 @@ uvm_km_alloc(struct vm_map *map, vsize_t
*/
offset = kva - vm_map_min(kernel_map);
- UVMHIST_LOG(maphist, " kva=0x%jx, offset=0x%jx", kva, offset,0,0);
+ UVMHIST_LOG(maphist, " kva=%#jx, offset=%#jx", kva, offset,0,0);
/*
* now allocate and map in the memory... note that we are the only ones
@@ -719,7 +719,7 @@ uvm_km_alloc(struct vm_map *map, vsize_t
kmsan_mark((void *)kva, size, KMSAN_STATE_UNINIT);
}
- UVMHIST_LOG(maphist,"<- done (kva=0x%jx)", kva,0,0,0);
+ UVMHIST_LOG(maphist,"<- done (kva=%#jx)", kva,0,0,0);
return(kva);
}
Index: src/sys/uvm/uvm_pager.c
diff -u src/sys/uvm/uvm_pager.c:1.122 src/sys/uvm/uvm_pager.c:1.123
--- src/sys/uvm/uvm_pager.c:1.122 Sun Feb 23 15:46:43 2020
+++ src/sys/uvm/uvm_pager.c Mon Feb 24 12:38:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pager.c,v 1.122 2020/02/23 15:46:43 ad Exp $ */
+/* $NetBSD: uvm_pager.c,v 1.123 2020/02/24 12:38:57 rin Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.122 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.123 2020/02/24 12:38:57 rin Exp $");
#include "opt_uvmhist.h"
#include "opt_readahead.h"
@@ -173,7 +173,7 @@ uvm_pagermapin(struct vm_page **pps, int
const u_int first_color = VM_PGCOLOR(*pps);
UVMHIST_FUNC("uvm_pagermapin"); UVMHIST_CALLED(maphist);
- UVMHIST_LOG(maphist,"(pps=0x%#jx, npages=%jd, first_color=%ju)",
+ UVMHIST_LOG(maphist,"(pps=%#jx, npages=%jd, first_color=%ju)",
(uintptr_t)pps, npages, first_color, 0);
/*
@@ -230,7 +230,7 @@ enter:
}
pmap_update(vm_map_pmap(pager_map));
- UVMHIST_LOG(maphist, "<- done (KVA=0x%jx)", kva,0,0,0);
+ UVMHIST_LOG(maphist, "<- done (KVA=%#jx)", kva,0,0,0);
return(kva);
}
@@ -248,7 +248,7 @@ uvm_pagermapout(vaddr_t kva, int npages)
struct vm_map_entry *entries;
UVMHIST_FUNC("uvm_pagermapout"); UVMHIST_CALLED(maphist);
- UVMHIST_LOG(maphist, " (kva=0x%jx, npages=%jd)", kva, npages,0,0);
+ UVMHIST_LOG(maphist, " (kva=%#jx, npages=%jd)", kva, npages,0,0);
/*
* duplicate uvm_unmap, but add in pager_map_wanted handling.