aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING4
-rw-r--r--sys/arm/xscale/ixp425/avila_ata.c2
-rw-r--r--sys/arm/xscale/ixp425/ixp425.c8
-rw-r--r--sys/arm/xscale/pxa/pxa_obio.c2
-rw-r--r--sys/compat/ndis/kern_ndis.c4
-rw-r--r--sys/dev/acpica/acpi.c12
-rw-r--r--sys/dev/acpica/acpi_hpet.c2
-rw-r--r--sys/dev/acpica/acpi_timer.c2
-rw-r--r--sys/dev/advansys/adv_isa.c2
-rw-r--r--sys/dev/atkbdc/atkbdc_subr.c2
-rw-r--r--sys/dev/bxe/bxe.c2
-rw-r--r--sys/dev/cardbus/cardbus_cis.c3
-rw-r--r--sys/dev/ctau/if_ct.c6
-rw-r--r--sys/dev/ed/if_ed_3c503.c2
-rw-r--r--sys/dev/ed/if_ed_cbus.c22
-rw-r--r--sys/dev/fdt/simplebus.c6
-rw-r--r--sys/dev/iir/iir_pci.c2
-rw-r--r--sys/dev/mca/mca_bus.c12
-rw-r--r--sys/dev/mxge/if_mxge.c6
-rw-r--r--sys/dev/ofw/ofwbus.c4
-rw-r--r--sys/dev/pccard/pccard.c10
-rw-r--r--sys/dev/pccard/pccard_cis.c12
-rw-r--r--sys/dev/pccbb/pccbb.c10
-rw-r--r--sys/dev/pccbb/pccbb_pci.c2
-rw-r--r--sys/dev/pci/pci.c22
-rw-r--r--sys/dev/pci/pci_pci.c34
-rw-r--r--sys/dev/pci/pci_subr.c8
-rw-r--r--sys/dev/ppc/ppc.c4
-rw-r--r--sys/dev/proto/proto_bus_isa.c2
-rw-r--r--sys/dev/sound/isa/ad1816.c4
-rw-r--r--sys/dev/sound/isa/ess.c6
-rw-r--r--sys/dev/sound/isa/mss.c4
-rw-r--r--sys/dev/sound/isa/sb16.c4
-rw-r--r--sys/dev/sound/isa/sb8.c2
-rw-r--r--sys/dev/sound/pci/als4000.c2
-rw-r--r--sys/dev/sound/pci/atiixp.c2
-rw-r--r--sys/dev/sound/pci/aureal.c2
-rw-r--r--sys/dev/sound/pci/cmi.c2
-rw-r--r--sys/dev/sound/pci/cs4281.c2
-rw-r--r--sys/dev/sound/pci/csapcm.c2
-rw-r--r--sys/dev/sound/pci/ds1.c2
-rw-r--r--sys/dev/sound/pci/emu10k1.c2
-rw-r--r--sys/dev/sound/pci/emu10kx.c2
-rw-r--r--sys/dev/sound/pci/envy24.c2
-rw-r--r--sys/dev/sound/pci/envy24ht.c2
-rw-r--r--sys/dev/sound/pci/es137x.c2
-rw-r--r--sys/dev/sound/pci/fm801.c2
-rw-r--r--sys/dev/sound/pci/hdspe-pcm.c2
-rw-r--r--sys/dev/sound/pci/ich.c2
-rw-r--r--sys/dev/sound/pci/maestro.c2
-rw-r--r--sys/dev/sound/pci/maestro3.c2
-rw-r--r--sys/dev/sound/pci/neomagic.c2
-rw-r--r--sys/dev/sound/pci/solo.c2
-rw-r--r--sys/dev/sound/pci/t4dwave.c2
-rw-r--r--sys/dev/sound/pci/via8233.c2
-rw-r--r--sys/dev/sound/pci/via82c686.c2
-rw-r--r--sys/dev/sound/pci/vibes.c4
-rw-r--r--sys/dev/wl/if_wl.c2
-rw-r--r--sys/dev/xe/if_xe.c4
-rw-r--r--sys/dev/xe/if_xe_pccard.c2
-rw-r--r--sys/kern/subr_rman.c50
-rw-r--r--sys/mips/atheros/apb.c2
-rw-r--r--sys/mips/mips/nexus.c4
-rw-r--r--sys/mips/nlm/xlp_pci.c2
-rw-r--r--sys/mips/nlm/xlp_simplebus.c4
-rw-r--r--sys/mips/rmi/iodi.c6
-rw-r--r--sys/mips/rmi/xlr_pci.c2
-rw-r--r--sys/powerpc/mpc85xx/lbc.c8
-rw-r--r--sys/powerpc/ofw/ofw_pci.c8
-rw-r--r--sys/powerpc/powermac/uninorth.c2
-rw-r--r--sys/powerpc/powerpc/nexus.c2
-rw-r--r--sys/sparc64/pci/apb.c10
-rw-r--r--sys/sys/_types.h2
-rw-r--r--sys/sys/param.h2
-rw-r--r--sys/x86/x86/io_apic.c8
-rw-r--r--usr.sbin/devinfo/devinfo.c4
76 files changed, 204 insertions, 197 deletions
diff --git a/UPDATING b/UPDATING
index d3e454550828..e85fe7f36fe7 100644
--- a/UPDATING
+++ b/UPDATING
@@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20160317:
+ Resource range types have grown from unsigned long to uintmax_t. All
+ drivers, and anything using libdevinfo, need to be recompiled.
+
20160311:
WITH_FAST_DEPEND is now enabled by default for in-tree and out-of-tree
builds. It no longer runs mkdep(1) during 'make depend', and the
diff --git a/sys/arm/xscale/ixp425/avila_ata.c b/sys/arm/xscale/ixp425/avila_ata.c
index e3a9a520c6c5..f6dfaa642424 100644
--- a/sys/arm/xscale/ixp425/avila_ata.c
+++ b/sys/arm/xscale/ixp425/avila_ata.c
@@ -287,7 +287,7 @@ ata_avila_alloc_resource(device_t dev, device_t child, int type, int *rid,
struct ata_avila_softc *sc = device_get_softc(dev);
KASSERT(type == SYS_RES_IRQ && *rid == ATA_IRQ_RID,
- ("type %u rid %u start %lu end %lu count %lu flags %u",
+ ("type %u rid %u start %ju end %ju count %ju flags %u",
type, *rid, start, end, count, flags));
/* doesn't matter what we return so reuse the real thing */
diff --git a/sys/arm/xscale/ixp425/ixp425.c b/sys/arm/xscale/ixp425/ixp425.c
index 017d56750fb4..20120e60010b 100644
--- a/sys/arm/xscale/ixp425/ixp425.c
+++ b/sys/arm/xscale/ixp425/ixp425.c
@@ -533,7 +533,7 @@ ixp425_alloc_resource(device_t dev, device_t child, int type, int *rid,
(start - vtrans->hwbase);
if (bootverbose)
device_printf(child,
- "%s: assign 0x%lx:0x%lx%s\n",
+ "%s: assign 0x%jx:0x%jx%s\n",
__func__, start, end - start,
vtrans->isa4x ? " A4X" :
vtrans->isslow ? " SLOW" : "");
@@ -542,14 +542,14 @@ ixp425_alloc_resource(device_t dev, device_t child, int type, int *rid,
vtrans = gethwvtrans(start, end - start);
if (vtrans == NULL) {
/* likely means above table needs to be updated */
- device_printf(child, "%s: no mapping for 0x%lx:0x%lx\n",
+ device_printf(child, "%s: no mapping for 0x%jx:0x%jx\n",
__func__, start, end - start);
return NULL;
}
rv = rman_reserve_resource(&sc->sc_mem_rman, start, end,
end - start, flags, child);
if (rv == NULL) {
- device_printf(child, "%s: cannot reserve 0x%lx:0x%lx\n",
+ device_printf(child, "%s: cannot reserve 0x%jx:0x%jx\n",
__func__, start, end - start);
return NULL;
}
@@ -586,7 +586,7 @@ ixp425_activate_resource(device_t dev, device_t child, int type, int rid,
if (type == SYS_RES_MEMORY) {
vtrans = gethwvtrans(rman_get_start(r), rman_get_size(r));
if (vtrans == NULL) { /* NB: should not happen */
- device_printf(child, "%s: no mapping for 0x%lx:0x%lx\n",
+ device_printf(child, "%s: no mapping for 0x%jx:0x%jx\n",
__func__, rman_get_start(r), rman_get_size(r));
return (ENOENT);
}
diff --git a/sys/arm/xscale/pxa/pxa_obio.c b/sys/arm/xscale/pxa/pxa_obio.c
index 6761ca37ba93..06a232a3aaa2 100644
--- a/sys/arm/xscale/pxa/pxa_obio.c
+++ b/sys/arm/xscale/pxa/pxa_obio.c
@@ -390,7 +390,7 @@ pxa_alloc_gpio_irq(device_t dev, device_t child, int type, int *rid,
}
if (bootverbose)
- device_printf(dev, "lazy allocation of irq %ld for %s\n",
+ device_printf(dev, "lazy allocation of irq %jd for %s\n",
start, device_get_nameunit(child));
return (rv);
diff --git a/sys/compat/ndis/kern_ndis.c b/sys/compat/ndis/kern_ndis.c
index 2ad1683a6c87..90e79b019b7f 100644
--- a/sys/compat/ndis/kern_ndis.c
+++ b/sys/compat/ndis/kern_ndis.c
@@ -348,13 +348,13 @@ ndis_create_sysctls(arg)
ndis_add_sysctl(sc, "BusType", "Bus Type", buf, NDIS_FLAG_RDONLY);
if (sc->ndis_res_io != NULL) {
- sprintf(buf, "0x%lx", rman_get_start(sc->ndis_res_io));
+ sprintf(buf, "0x%jx", rman_get_start(sc->ndis_res_io));
ndis_add_sysctl(sc, "IOBaseAddress",
"Base I/O Address", buf, NDIS_FLAG_RDONLY);
}
if (sc->ndis_irq != NULL) {
- sprintf(buf, "%lu", rman_get_start(sc->ndis_irq));
+ sprintf(buf, "%ju", rman_get_start(sc->ndis_irq));
ndis_add_sysctl(sc, "InterruptNumber",
"Interrupt Number", buf, NDIS_FLAG_RDONLY);
}
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 70d4bcebe3c9..6f5a11f8e797 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -795,10 +795,10 @@ acpi_print_child(device_t bus, device_t child)
int retval = 0;
retval += bus_print_child_header(bus, child);
- retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#lx");
- retval += resource_list_print_type(rl, "iomem", SYS_RES_MEMORY, "%#lx");
- retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld");
- retval += resource_list_print_type(rl, "drq", SYS_RES_DRQ, "%ld");
+ retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#jx");
+ retval += resource_list_print_type(rl, "iomem", SYS_RES_MEMORY, "%#jx");
+ retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%jd");
+ retval += resource_list_print_type(rl, "drq", SYS_RES_DRQ, "%jd");
if (device_get_flags(child))
retval += printf(" flags %#x", device_get_flags(child));
retval += bus_print_child_domain(bus, child);
@@ -1156,7 +1156,7 @@ acpi_sysres_alloc(device_t dev)
rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev);
STAILQ_FOREACH(rle, rl, link) {
if (rle->res != NULL) {
- device_printf(dev, "duplicate resource for %lx\n", rle->start);
+ device_printf(dev, "duplicate resource for %jx\n", rle->start);
continue;
}
@@ -1179,7 +1179,7 @@ acpi_sysres_alloc(device_t dev)
rman_manage_region(rm, rman_get_start(res), rman_get_end(res));
rle->res = res;
} else if (bootverbose)
- device_printf(dev, "reservation of %lx, %lx (%d) failed\n",
+ device_printf(dev, "reservation of %jx, %jx (%d) failed\n",
rle->start, rle->count, rle->type);
}
return (0);
diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c
index 76fbd5aba256..da1e160e2036 100644
--- a/sys/dev/acpica/acpi_hpet.c
+++ b/sys/dev/acpica/acpi_hpet.c
@@ -453,7 +453,7 @@ hpet_attach(device_t dev)
/* Validate that we can access the whole region. */
if (rman_get_size(sc->mem_res) < HPET_MEM_WIDTH) {
- device_printf(dev, "memory region width %ld too small\n",
+ device_printf(dev, "memory region width %jd too small\n",
rman_get_size(sc->mem_res));
bus_free_resource(dev, SYS_RES_MEMORY, sc->mem_res);
return (ENXIO);
diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c
index 2cdf90805d2c..34a832089a23 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -152,7 +152,7 @@ acpi_timer_identify(driver_t *driver, device_t parent)
rlen = AcpiGbl_FADT.PmTimerLength;
rstart = AcpiGbl_FADT.XPmTimerBlock.Address;
if (bus_set_resource(dev, rtype, rid, rstart, rlen))
- device_printf(dev, "couldn't set resource (%s 0x%lx+0x%lx)\n",
+ device_printf(dev, "couldn't set resource (%s 0x%jx+0x%jx)\n",
(rtype == SYS_RES_IOPORT) ? "port" : "mem", rstart, rlen);
return_VOID;
}
diff --git a/sys/dev/advansys/adv_isa.c b/sys/dev/advansys/adv_isa.c
index 00381a3a4de7..3b3a45bea509 100644
--- a/sys/dev/advansys/adv_isa.c
+++ b/sys/dev/advansys/adv_isa.c
@@ -136,7 +136,7 @@ adv_isa_probe(device_t dev)
|| (iobase != adv_isa_ioports[port_index])) {
if (bootverbose)
device_printf(dev,
- "Invalid baseport of 0x%lx specified. "
+ "Invalid baseport of 0x%jx specified. "
"Nearest valid baseport is 0x%x. Failing "
"probe.\n", iobase,
(port_index <= max_port_index) ?
diff --git a/sys/dev/atkbdc/atkbdc_subr.c b/sys/dev/atkbdc/atkbdc_subr.c
index 28730c6bbcf4..436d97adab66 100644
--- a/sys/dev/atkbdc/atkbdc_subr.c
+++ b/sys/dev/atkbdc/atkbdc_subr.c
@@ -63,7 +63,7 @@ atkbdc_print_child(device_t bus, device_t dev)
retval += printf(" flags 0x%x", flags);
irq = bus_get_resource_start(dev, SYS_RES_IRQ, kbdcdev->rid);
if (irq != 0)
- retval += printf(" irq %ld", irq);
+ retval += printf(" irq %jd", irq);
retval += bus_print_child_footer(bus, dev);
return (retval);
diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c
index d944395a2a99..b2ad4f130fc1 100644
--- a/sys/dev/bxe/bxe.c
+++ b/sys/dev/bxe/bxe.c
@@ -12845,7 +12845,7 @@ bxe_allocate_bars(struct bxe_softc *sc)
sc->bar[i].handle = rman_get_bushandle(sc->bar[i].resource);
sc->bar[i].kva = (vm_offset_t)rman_get_virtual(sc->bar[i].resource);
- BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %p-%p (%ld) -> %p\n",
+ BLOGI(sc, "PCI BAR%d [%02x] memory allocated: %p-%p (%jd) -> %p\n",
i, PCIR_BAR(i),
(void *)rman_get_start(sc->bar[i].resource),
(void *)rman_get_end(sc->bar[i].resource),
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c
index 5d7704a53f59..f9f7816e4c4b 100644
--- a/sys/dev/cardbus/cardbus_cis.c
+++ b/sys/dev/cardbus/cardbus_cis.c
@@ -485,7 +485,8 @@ cardbus_read_tuple_init(device_t cbdev, device_t child, uint32_t *start,
"to read CIS.\n");
return (NULL);
}
- DEVPRINTF((cbdev, "CIS Mapped to %#lx\n", rman_get_start(res)));
+ DEVPRINTF((cbdev, "CIS Mapped to %#jx\n",
+ rman_get_start(res)));
/* Flip to the right ROM image if CIS is in ROM */
if (space == PCIM_CIS_ASI_ROM) {
diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c
index da8d32c11022..a3df2a8c5d24 100644
--- a/sys/dev/ctau/if_ct.c
+++ b/sys/dev/ctau/if_ct.c
@@ -459,7 +459,7 @@ static int ct_probe (device_t dev)
}
if (!ct_probe_board (iobase, -1, -1)) {
- printf ("ct%d: probing for Tau-ISA at %lx faild\n", unit, iobase);
+ printf ("ct%d: probing for Tau-ISA at %jx faild\n", unit, iobase);
return ENXIO;
}
@@ -632,7 +632,7 @@ static int ct_attach (device_t dev)
ct_ln[2] = '0' + unit;
mtx_init (&bd->ct_mtx, ct_ln, MTX_NETWORK_LOCK, MTX_DEF|MTX_RECURSE);
if (! probe_irq (b, irq)) {
- printf ("ct%d: irq %ld not functional\n", unit, irq);
+ printf ("ct%d: irq %jd not functional\n", unit, irq);
bd->board = 0;
adapter [unit] = 0;
free (b, M_DEVBUF);
@@ -651,7 +651,7 @@ static int ct_attach (device_t dev)
if (bus_setup_intr (dev, bd->irq_res,
INTR_TYPE_NET|INTR_MPSAFE,
NULL, ct_intr, bd, &bd->intrhand)) {
- printf ("ct%d: Can't setup irq %ld\n", unit, irq);
+ printf ("ct%d: Can't setup irq %jd\n", unit, irq);
bd->board = 0;
adapter [unit] = 0;
free (b, M_DEVBUF);
diff --git a/sys/dev/ed/if_ed_3c503.c b/sys/dev/ed/if_ed_3c503.c
index 353fbbf232a5..bcb9e44a94ca 100644
--- a/sys/dev/ed/if_ed_3c503.c
+++ b/sys/dev/ed/if_ed_3c503.c
@@ -324,7 +324,7 @@ ed_probe_3Com(device_t dev, int port_rid, int flags)
ed_asic_outb(sc, ED_3COM_IDCFR, ED_3COM_IDCFR_IRQ5);
break;
default:
- device_printf(dev, "Invalid irq configuration (%ld) must be 3-5,9 for 3c503\n",
+ device_printf(dev, "Invalid irq configuration (%jd) must be 3-5,9 for 3c503\n",
irq);
return (ENXIO);
}
diff --git a/sys/dev/ed/if_ed_cbus.c b/sys/dev/ed/if_ed_cbus.c
index f9672accabad..7926fa8e2389 100644
--- a/sys/dev/ed/if_ed_cbus.c
+++ b/sys/dev/ed/if_ed_cbus.c
@@ -1021,7 +1021,7 @@ ed_probe_CNET98(device_t dev, int port_rid, int flags)
if (((rman_get_start(sc->port_res) & 0x0fff) != 0x03d0)
|| ((rman_get_start(sc->port_res) & 0xf000) < (u_short) 0xa000)) {
#ifdef DIAGNOSTIC
- device_printf(dev, "Invalid i/o port configuration (0x%lx) "
+ device_printf(dev, "Invalid i/o port configuration (0x%jx) "
"must be %s for %s\n", rman_get_start(sc->port_res),
"0x[a-f]3d0", "CNET98");
#endif
@@ -1032,7 +1032,7 @@ ed_probe_CNET98(device_t dev, int port_rid, int flags)
/* Check window area address */
tmp_s = rman_get_start(sc->mem_res) >> 12;
if (tmp_s < 0x80) {
- device_printf(dev, "Please change window address(0x%lx)\n",
+ device_printf(dev, "Please change window address(0x%jx)\n",
rman_get_start(sc->mem_res));
return (ENXIO);
}
@@ -1040,8 +1040,8 @@ ed_probe_CNET98(device_t dev, int port_rid, int flags)
tmp_s &= 0x0f;
tmp = rman_get_start(sc->port_res) >> 12;
if ((tmp_s <= tmp) && (tmp < (tmp_s + 4))) {
- device_printf(dev, "Please change iobase address(0x%lx) "
- "or window address(0x%lx)\n",
+ device_printf(dev, "Please change iobase address(0x%jx) "
+ "or window address(0x%jx)\n",
rman_get_start(sc->port_res),
rman_get_start(sc->mem_res));
return (ENXIO);
@@ -1128,7 +1128,7 @@ ed_probe_CNET98(device_t dev, int port_rid, int flags)
tmp = ED_CNET98_INT_IRQ13;
break;
default:
- device_printf(dev, "Invalid irq configuration (%ld) must be "
+ device_printf(dev, "Invalid irq configuration (%jd) must be "
"%s for %s\n", conf_irq, "3,5,6,9,12,13", "CNET98");
return (ENXIO);
}
@@ -1169,7 +1169,7 @@ ed_probe_CNET98EL(device_t dev, int port_rid, int flags)
/* Check I/O address. 0x[0-f]3d0 are allowed. */
if ((rman_get_start(sc->port_res) & 0x0fff) != 0x03d0) {
#ifdef DIAGNOSTIC
- device_printf(dev, "Invalid i/o port configuration (0x%lx) "
+ device_printf(dev, "Invalid i/o port configuration (0x%jx) "
"must be %s for %s\n", rman_get_start(sc->port_res),
"0x?3d0", "CNET98E/L");
#endif
@@ -1223,7 +1223,7 @@ ed_probe_CNET98EL(device_t dev, int port_rid, int flags)
break;
#endif
default:
- device_printf(dev, "Invalid irq configuration (%ld) must be "
+ device_printf(dev, "Invalid irq configuration (%jd) must be "
"%s for %s\n", conf_irq, "3,5,6", "CNET98E/L");
return (ENXIO);
}
@@ -1285,7 +1285,7 @@ ed_probe_NEC77(device_t dev, int port_rid, int flags)
tmp = ED_NEC77_IRQ13;
break;
default:
- device_printf(dev, "Invalid irq configuration (%ld) must be "
+ device_printf(dev, "Invalid irq configuration (%jd) must be "
"%s for %s\n", conf_irq, "3,5,6,12,13", "PC-9801-77");
return (ENXIO);
}
@@ -1337,7 +1337,7 @@ ed_probe_NW98X(device_t dev, int port_rid, int flags)
tmp = ED_NW98X_IRQ13;
break;
default:
- device_printf(dev, "Invalid irq configuration (%ld) must be "
+ device_printf(dev, "Invalid irq configuration (%jd) must be "
"%s for %s\n", conf_irq, "3,5,6,12,13", "EC/EP-98X");
return (ENXIO);
}
@@ -1439,7 +1439,7 @@ ed_probe_SB98(device_t dev, int port_rid, int flags)
/* Check I/O address. 00d[02468ace] are allowed. */
if ((rman_get_start(sc->port_res) & ~0x000e) != 0x00d0) {
#ifdef DIAGNOSTIC
- device_printf(dev, "Invalid i/o port configuration (0x%lx) "
+ device_printf(dev, "Invalid i/o port configuration (0x%jx) "
"must be %s for %s\n", rman_get_start(sc->port_res),
"0xd?", "SB9801");
#endif
@@ -1475,7 +1475,7 @@ ed_probe_SB98(device_t dev, int port_rid, int flags)
tmp = ED_SB98_CFG_IRQ12;
break;
default:
- device_printf(dev, "Invalid irq configuration (%ld) must be "
+ device_printf(dev, "Invalid irq configuration (%jd) must be "
"%s for %s\n", conf_irq, "3,5,6,12", "SB9801");
return (ENXIO);
}
diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c
index 36c278f388cf..8d43a7057bcf 100644
--- a/sys/dev/fdt/simplebus.c
+++ b/sys/dev/fdt/simplebus.c
@@ -369,7 +369,7 @@ simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid,
if (j == sc->nranges && sc->nranges != 0) {
if (bootverbose)
device_printf(bus, "Could not map resource "
- "%#lx-%#lx\n", start, end);
+ "%#jx-%#jx\n", start, end);
return (NULL);
}
@@ -387,8 +387,8 @@ simplebus_print_res(struct simplebus_devinfo *di)
if (di == NULL)
return (0);
rv = 0;
- rv += resource_list_print_type(&di->rl, "mem", SYS_RES_MEMORY, "%#lx");
- rv += resource_list_print_type(&di->rl, "irq", SYS_RES_IRQ, "%ld");
+ rv += resource_list_print_type(&di->rl, "mem", SYS_RES_MEMORY, "%#jx");
+ rv += resource_list_print_type(&di->rl, "irq", SYS_RES_IRQ, "%jd");
return (rv);
}
diff --git a/sys/dev/iir/iir_pci.c b/sys/dev/iir/iir_pci.c
index 261f5a698144..5db66b1d9cb0 100644
--- a/sys/dev/iir/iir_pci.c
+++ b/sys/dev/iir/iir_pci.c
@@ -228,7 +228,7 @@ iir_pci_attach(device_t dev)
/* check and reset interface area */
bus_write_4(gdt->sc_dpmem, GDT_MPR_IC, htole32(GDT_MPR_MAGIC));
if (bus_read_4(gdt->sc_dpmem, GDT_MPR_IC) != htole32(GDT_MPR_MAGIC)) {
- device_printf(dev, "cannot access DPMEM at 0x%lx (shadowed?)\n",
+ device_printf(dev, "cannot access DPMEM at 0x%jx (shadowed?)\n",
rman_get_start(gdt->sc_dpmem));
error = ENXIO;
goto err;
diff --git a/sys/dev/mca/mca_bus.c b/sys/dev/mca/mca_bus.c
index 55ac9ed77fd9..2de61da3d455 100644
--- a/sys/dev/mca/mca_bus.c
+++ b/sys/dev/mca/mca_bus.c
@@ -365,11 +365,11 @@ mca_print_child (device_t dev, device_t child)
rid = 0;
while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_IOPORT, rid++))) {
if (rle->count == 1) {
- snprintf(buf, sizeof(buf), "%s%lx",
+ snprintf(buf, sizeof(buf), "%s%jx",
((rid == 1) ? "io 0x" : "0x"),
rle->start);
} else {
- snprintf(buf, sizeof(buf), "%s%lx-0x%lx",
+ snprintf(buf, sizeof(buf), "%s%jx-0x%jx",
((rid == 1) ? "io 0x" : "0x"),
rle->start,
(rle->start + rle->count));
@@ -381,11 +381,11 @@ mca_print_child (device_t dev, device_t child)
rid = 0;
while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_MEMORY, rid++))) {
if (rle->count == 1) {
- snprintf(buf, sizeof(buf), "%s%lx",
+ snprintf(buf, sizeof(buf), "%s%jx",
((rid == 1) ? "mem 0x" : "0x"),
rle->start);
} else {
- snprintf(buf, sizeof(buf), "%s%lx-0x%lx",
+ snprintf(buf, sizeof(buf), "%s%jx-0x%jx",
((rid == 1) ? "mem 0x" : "0x"),
rle->start,
(rle->start + rle->count));
@@ -396,14 +396,14 @@ mca_print_child (device_t dev, device_t child)
rid = 0;
while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_IRQ, rid++))) {
- snprintf(buf, sizeof(buf), "irq %ld", rle->start);
+ snprintf(buf, sizeof(buf), "irq %jd", rle->start);
mca_reg_print(child, buf,
((rid == 1) ? &separator : NULL), &column);
}
rid = 0;
while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_DRQ, rid++))) {
- snprintf(buf, sizeof(buf), "drq %lx", rle->start);
+ snprintf(buf, sizeof(buf), "drq %jx", rle->start);
mca_reg_print(child, buf,
((rid == 1) ? &separator : NULL), &column);
}
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c
index 928917f9cf8f..ddbaf89c8230 100644
--- a/sys/dev/mxge/if_mxge.c
+++ b/sys/dev/mxge/if_mxge.c
@@ -4612,7 +4612,7 @@ mxge_add_msix_irqs(mxge_softc_t *sc)
device_printf(sc->dev, "using %d msix IRQs:",
sc->num_slices);
for (i = 0; i < sc->num_slices; i++)
- printf(" %ld", rman_get_start(sc->msix_irq_res[i]));
+ printf(" %jd", rman_get_start(sc->msix_irq_res[i]));
printf("\n");
}
return (0);
@@ -4668,7 +4668,7 @@ mxge_add_single_irq(mxge_softc_t *sc)
return ENXIO;
}
if (mxge_verbose)
- device_printf(sc->dev, "using %s irq %ld\n",
+ device_printf(sc->dev, "using %s irq %jd\n",
sc->legacy_irq ? "INTx" : "MSI",
rman_get_start(sc->irq_res));
err = bus_setup_intr(sc->dev, sc->irq_res,
@@ -4823,7 +4823,7 @@ mxge_attach(device_t dev)
sc->sram = rman_get_virtual(sc->mem_res);
sc->sram_size = 2*1024*1024 - (2*(48*1024)+(32*1024)) - 0x100;
if (sc->sram_size > rman_get_size(sc->mem_res)) {
- device_printf(dev, "impossible memory region size %ld\n",
+ device_printf(dev, "impossible memory region size %jd\n",
rman_get_size(sc->mem_res));
err = ENXIO;
goto abort_with_mem_res;
diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c
index 8eb5dd51833c..fc4341043202 100644
--- a/sys/dev/ofw/ofwbus.c
+++ b/sys/dev/ofw/ofwbus.c
@@ -200,8 +200,8 @@ ofwbus_alloc_resource(device_t bus, device_t child, int type, int *rid,
return (NULL);
}
start = rle->start;
- count = ulmax(count, rle->count);
- end = ulmax(rle->end, start + count - 1);
+ count = ummax(count, rle->count);
+ end = ummax(rle->end, start + count - 1);
}
switch (type) {
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 06812427a2b0..1c8c3c03467a 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -507,7 +507,7 @@ pccard_function_init(struct pccard_function *pf, int entry)
end = start + ios->length - 1;
else
end = ~0;
- DEVPRINTF((bus, "I/O rid %d start %#lx end %#lx\n",
+ DEVPRINTF((bus, "I/O rid %d start %#jx end %#jx\n",
i, start, end));
rid = i;
len = ios->length;
@@ -531,7 +531,7 @@ pccard_function_init(struct pccard_function *pf, int entry)
end = start + mems->length - 1;
else
end = ~0;
- DEVPRINTF((bus, "Memory rid %d start %#lx end %#lx\ncardaddr %#lx hostaddr %#lx length %#lx\n",
+ DEVPRINTF((bus, "Memory rid %d start %#jx end %#jx\ncardaddr %#jx hostaddr %#jx length %#jx\n",
i, start, end, mems->cardaddr, mems->hostaddr,
mems->length));
rid = i;
@@ -602,7 +602,7 @@ pccard_function_free(struct pccard_function *pf)
device_printf(pf->sc->dev,
"function_free: Resource still owned by "
"child, oops. "
- "(type=%d, rid=%d, addr=%#lx)\n",
+ "(type=%d, rid=%d, addr=%#jx)\n",
rle->type, rle->rid,
rman_get_start(rle->res));
BUS_RELEASE_RESOURCE(device_get_parent(pf->sc->dev),
@@ -697,7 +697,7 @@ pccard_function_enable(struct pccard_function *pf)
&pf->ccr_rid, PCCARD_MEM_PAGE_SIZE, RF_ACTIVE);
if (!pf->ccr_res)
goto bad;
- DEVPRINTF((dev, "ccr_res == %#lx-%#lx, base=%#x\n",
+ DEVPRINTF((dev, "ccr_res == %#jx-%#jx, base=%#x\n",
rman_get_start(pf->ccr_res), rman_get_end(pf->ccr_res),
pf->ccr_base));
CARD_SET_RES_FLAGS(device_get_parent(dev), dev, SYS_RES_MEMORY,
@@ -1197,7 +1197,7 @@ pccard_release_resource(device_t dev, device_t child, int type, int rid,
if (!rle) {
device_printf(dev, "Allocated resource not found, "
- "%d %#x %#lx %#lx\n",
+ "%d %#x %#jx %#jx\n",
type, rid, rman_get_start(r), rman_get_size(r));
return ENOENT;
}
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c
index 4bd06b56cccc..4bd5e772d1b4 100644
--- a/sys/dev/pccard/pccard_cis.c
+++ b/sys/dev/pccard/pccard_cis.c
@@ -151,7 +151,7 @@ pccard_scan_cis(device_t bus, device_t dev, pccard_scan_t fct, void *arg)
tuple.memh = rman_get_bushandle(res);
tuple.ptr = 0;
- DPRINTF(("cis mem map %#x (resource: %#lx)\n",
+ DPRINTF(("cis mem map %#x (resource: %#jx)\n",
(unsigned int) tuple.memh, rman_get_start(res)));
tuple.mult = 2;
@@ -576,9 +576,9 @@ pccard_print_cis(device_t dev)
printf("; iomask %#lx, iospace", cfe->iomask);
for (i = 0; i < cfe->num_iospace; i++) {
- printf(" %#lx", cfe->iospace[i].start);
+ printf(" %#jx", cfe->iospace[i].start);
if (cfe->iospace[i].length)
- printf("-%#lx",
+ printf("-%#jx",
cfe->iospace[i].start +
cfe->iospace[i].length - 1);
}
@@ -587,14 +587,14 @@ pccard_print_cis(device_t dev)
printf("; memspace");
for (i = 0; i < cfe->num_memspace; i++) {
- printf(" %#lx",
+ printf(" %#jx",
cfe->memspace[i].cardaddr);
if (cfe->memspace[i].length)
- printf("-%#lx",
+ printf("-%#jx",
cfe->memspace[i].cardaddr +
cfe->memspace[i].length - 1);
if (cfe->memspace[i].hostaddr)
- printf("@%#lx",
+ printf("@%#jx",
cfe->memspace[i].hostaddr);
}
}
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 93987715fdee..067aa5a8b5f7 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -229,7 +229,7 @@ cbb_destroy_res(struct cbb_softc *sc)
while ((rle = SLIST_FIRST(&sc->rl)) != NULL) {
device_printf(sc->dev, "Danger Will Robinson: Resource "
"left allocated! This is a bug... "
- "(rid=%x, type=%d, addr=%lx)\n", rle->rid, rle->type,
+ "(rid=%x, type=%d, addr=%jx)\n", rle->rid, rle->type,
rman_get_start(rle->res));
SLIST_REMOVE_HEAD(&sc->rl, link);
free(rle, M_DEVBUF);
@@ -1241,8 +1241,8 @@ cbb_cardbus_alloc_resource(device_t brdev, device_t child, int type,
case SYS_RES_IRQ:
tmp = rman_get_start(sc->irq_res);
if (start > tmp || end < tmp || count != 1) {
- device_printf(child, "requested interrupt %ld-%ld,"
- "count = %ld not supported by cbb\n",
+ device_printf(child, "requested interrupt %jd-%jd,"
+ "count = %jd not supported by cbb\n",
start, end, count);
return (NULL);
}
@@ -1425,8 +1425,8 @@ cbb_pcic_alloc_resource(device_t brdev, device_t child, int type, int *rid,
case SYS_RES_IRQ:
tmp = rman_get_start(sc->irq_res);
if (start > tmp || end < tmp || count != 1) {
- device_printf(child, "requested interrupt %ld-%ld,"
- "count = %ld not supported by cbb\n",
+ device_printf(child, "requested interrupt %jd-%jd,"
+ "count = %jd not supported by cbb\n",
start, end, count);
return (NULL);
}
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index e739027dc885..4ec8d9b60527 100644
--- a/sys/dev/pccbb/pccbb_pci.c
+++ b/sys/dev/pccbb/pccbb_pci.c
@@ -313,7 +313,7 @@ cbb_pci_attach(device_t brdev)
mtx_destroy(&sc->mtx);
return (ENOMEM);
} else {
- DEVPRINTF((brdev, "Found memory at %08lx\n",
+ DEVPRINTF((brdev, "Found memory at %jx\n",
rman_get_start(sc->base_res)));
}
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 492efe02294b..8343181781f8 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1643,7 +1643,7 @@ pci_alloc_msix_method(device_t dev, device_t child, int *count)
if (bootverbose) {
rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, 1);
if (actual == 1)
- device_printf(child, "using IRQ %lu for MSI-X\n",
+ device_printf(child, "using IRQ %ju for MSI-X\n",
rle->start);
else {
int run;
@@ -1653,7 +1653,7 @@ pci_alloc_msix_method(device_t dev, device_t child, int *count)
* IRQ values as ranges. 'irq' is the previous IRQ.
* 'run' is true if we are in a range.
*/
- device_printf(child, "using IRQs %lu", rle->start);
+ device_printf(child, "using IRQs %ju", rle->start);
irq = rle->start;
run = 0;
for (i = 1; i < actual; i++) {
@@ -1674,7 +1674,7 @@ pci_alloc_msix_method(device_t dev, device_t child, int *count)
}
/* Start new range. */
- printf(",%lu", rle->start);
+ printf(",%ju", rle->start);
irq = rle->start;
}
@@ -3572,13 +3572,13 @@ pci_alloc_secbus(device_t dev, device_t child, int *rid, rman_res_t start,
start, end, count, flags & ~RF_ACTIVE);
if (res == NULL) {
resource_list_delete(rl, PCI_RES_BUS, *rid);
- device_printf(child, "allocating %lu bus%s failed\n",
+ device_printf(child, "allocating %ju bus%s failed\n",
count, count == 1 ? "" : "es");
return (NULL);
}
if (bootverbose)
device_printf(child,
- "Lazy allocation of %lu bus%s at %lu\n", count,
+ "Lazy allocation of %ju bus%s at %ju\n", count,
count == 1 ? "" : "es", rman_get_start(res));
PCI_WRITE_CONFIG(dev, child, sec_reg, rman_get_start(res), 1);
PCI_WRITE_CONFIG(dev, child, sub_reg, rman_get_end(res), 1);
@@ -4391,9 +4391,9 @@ pci_print_child(device_t dev, device_t child)
retval += bus_print_child_header(dev, child);
- retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#lx");
- retval += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#lx");
- retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld");
+ retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#jx");
+ retval += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#jx");
+ retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%jd");
if (device_get_flags(dev))
retval += printf(" flags %#x", device_get_flags(dev));
@@ -4971,13 +4971,13 @@ pci_reserve_map(device_t dev, device_t child, int type, int *rid,
if (res == NULL) {
resource_list_delete(rl, type, *rid);
device_printf(child,
- "%#lx bytes of rid %#x res %d failed (%#lx, %#lx).\n",
+ "%#jx bytes of rid %#x res %d failed (%#jx, %#jx).\n",
count, *rid, type, start, end);
goto out;
}
if (bootverbose)
device_printf(child,
- "Lazy allocation of %#lx bytes rid %#x type %d at %#lx\n",
+ "Lazy allocation of %#jx bytes rid %#x type %d at %#jx\n",
count, *rid, type, rman_get_start(res));
map = rman_get_start(res);
pci_write_bar(child, pm, map);
@@ -5254,7 +5254,7 @@ pci_delete_resource(device_t dev, device_t child, int type, int rid)
resource_list_busy(rl, type, rid)) {
device_printf(dev, "delete_resource: "
"Resource still owned by child, oops. "
- "(type=%d, rid=%d, addr=%lx)\n",
+ "(type=%d, rid=%d, addr=%jx)\n",
type, rid, rman_get_start(rle->res));
return;
}
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 24f9b3aa8d46..112b198f0a66 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -247,7 +247,7 @@ pcib_is_isa_range(struct pcib_softc *sc, rman_res_t start, rman_res_t end,
alias:
if (bootverbose)
device_printf(sc->dev,
- "I/O range %#lx-%#lx overlaps with an ISA alias\n", start,
+ "I/O range %#jx-%#jx overlaps with an ISA alias\n", start,
end);
return (1);
}
@@ -339,7 +339,7 @@ alloc_ranges(rman_res_t start, rman_res_t end, void *arg)
rid = w->reg;
if (bootverbose)
device_printf(as->sc->dev,
- "allocating non-ISA range %#lx-%#lx\n", start, end);
+ "allocating non-ISA range %#jx-%#jx\n", start, end);
as->res[as->count] = bus_alloc_resource(as->sc->dev, SYS_RES_IOPORT,
&rid, start, end, end - start + 1, 0);
if (as->res[as->count] == NULL)
@@ -621,7 +621,7 @@ pcib_suballoc_bus(struct pcib_secbus *bus, device_t child, int *rid,
if (bootverbose)
device_printf(bus->dev,
- "allocated bus range (%lu-%lu) for rid %d of %s\n",
+ "allocated bus range (%ju-%ju) for rid %d of %s\n",
rman_get_start(res), rman_get_end(res), *rid,
pcib_child_name(child));
rman_set_rid(res, *rid);
@@ -646,7 +646,7 @@ pcib_grow_subbus(struct pcib_secbus *bus, rman_res_t new_end)
if (error)
return (error);
if (bootverbose)
- device_printf(bus->dev, "grew bus range to %lu-%lu\n",
+ device_printf(bus->dev, "grew bus range to %ju-%ju\n",
rman_get_start(bus->res), rman_get_end(bus->res));
error = rman_manage_region(&bus->rman, old_end + 1,
rman_get_end(bus->res));
@@ -694,8 +694,8 @@ pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid,
/* Finally, attempt to grow the existing resource. */
if (bootverbose) {
device_printf(bus->dev,
- "attempting to grow bus range for %lu buses\n", count);
- printf("\tback candidate range: %lu-%lu\n", start_free,
+ "attempting to grow bus range for %ju buses\n", count);
+ printf("\tback candidate range: %ju-%ju\n", start_free,
new_end);
}
if (pcib_grow_subbus(bus, new_end) == 0)
@@ -1174,7 +1174,7 @@ pcib_suballoc_resource(struct pcib_softc *sc, struct pcib_window *w,
if (bootverbose)
device_printf(sc->dev,
- "allocated %s range (%#lx-%#lx) for rid %x of %s\n",
+ "allocated %s range (%#jx-%#jx) for rid %x of %s\n",
w->name, rman_get_start(res), rman_get_end(res), *rid,
pcib_child_name(child));
rman_set_rid(res, *rid);
@@ -1401,7 +1401,7 @@ pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type,
if (error) {
if (bootverbose)
device_printf(sc->dev,
- "failed to allocate initial %s window (%#lx-%#lx,%#lx)\n",
+ "failed to allocate initial %s window (%#jx-%#jx,%#jx)\n",
w->name, start, end, count);
return (error);
}
@@ -1433,7 +1433,7 @@ pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type,
*/
if (bootverbose)
device_printf(sc->dev,
- "attempting to grow %s window for (%#lx-%#lx,%#lx)\n",
+ "attempting to grow %s window for (%#jx-%#jx,%#jx)\n",
w->name, start, end, count);
align = (rman_res_t)1 << RF_ALIGNMENT(flags);
if (start < w->base) {
@@ -1457,7 +1457,7 @@ pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type,
*/
if (front >= start && front <= end_free) {
if (bootverbose)
- printf("\tfront candidate range: %#lx-%#lx\n",
+ printf("\tfront candidate range: %#jx-%#jx\n",
front, end_free);
front &= ~wmask;
front = w->base - front;
@@ -1485,7 +1485,7 @@ pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type,
*/
if (back <= end && start_free <= back) {
if (bootverbose)
- printf("\tback candidate range: %#lx-%#lx\n",
+ printf("\tback candidate range: %#jx-%#jx\n",
start_free, back);
back |= wmask;
back -= w->limit;
@@ -1709,7 +1709,7 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
#endif
}
if (end < start) {
- device_printf(dev, "ioport: end (%lx) < start (%lx)\n",
+ device_printf(dev, "ioport: end (%jx) < start (%jx)\n",
end, start);
start = 0;
end = 0;
@@ -1717,13 +1717,13 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
}
if (!ok) {
device_printf(dev, "%s%srequested unsupported I/O "
- "range 0x%lx-0x%lx (decoding 0x%x-0x%x)\n",
+ "range 0x%jx-0x%jx (decoding 0x%x-0x%x)\n",
name, suffix, start, end, sc->iobase, sc->iolimit);
return (NULL);
}
if (bootverbose)
device_printf(dev,
- "%s%srequested I/O range 0x%lx-0x%lx: in range\n",
+ "%s%srequested I/O range 0x%jx-0x%jx: in range\n",
name, suffix, start, end);
break;
@@ -1778,7 +1778,7 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
#endif
}
if (end < start) {
- device_printf(dev, "memory: end (%lx) < start (%lx)\n",
+ device_printf(dev, "memory: end (%jx) < start (%jx)\n",
end, start);
start = 0;
end = 0;
@@ -1786,7 +1786,7 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
}
if (!ok && bootverbose)
device_printf(dev,
- "%s%srequested unsupported memory range %#lx-%#lx "
+ "%s%srequested unsupported memory range %#jx-%#jx "
"(decoding %#jx-%#jx, %#jx-%#jx)\n",
name, suffix, start, end,
(uintmax_t)sc->membase, (uintmax_t)sc->memlimit,
@@ -1795,7 +1795,7 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
return (NULL);
if (bootverbose)
device_printf(dev,"%s%srequested memory range "
- "0x%lx-0x%lx: good\n",
+ "0x%jx-0x%jx: good\n",
name, suffix, start, end);
break;
diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c
index 77c60c3baab8..f2811176c59f 100644
--- a/sys/dev/pci/pci_subr.c
+++ b/sys/dev/pci/pci_subr.c
@@ -185,7 +185,7 @@ pcib_host_res_decodes(struct pcib_host_resources *hr, int type, rman_res_t start
int rid;
if (bootverbose)
- device_printf(hr->hr_pcib, "decoding %d %srange %#lx-%#lx\n",
+ device_printf(hr->hr_pcib, "decoding %d %srange %#jx-%#jx\n",
type, flags & RF_PREFETCHABLE ? "prefetchable ": "", start,
end);
rid = resource_list_add_next(&hr->hr_rl, type, start, end,
@@ -229,8 +229,8 @@ restart:
if (((flags & RF_PREFETCHABLE) != 0) !=
((rle->flags & RLE_PREFETCH) != 0))
continue;
- new_start = ulmax(start, rle->start);
- new_end = ulmin(end, rle->end);
+ new_start = ummax(start, rle->start);
+ new_end = ummin(end, rle->end);
if (new_start > new_end ||
new_start + count - 1 > new_end ||
new_start + count < new_start)
@@ -240,7 +240,7 @@ restart:
if (r != NULL) {
if (bootverbose)
device_printf(hr->hr_pcib,
- "allocated type %d (%#lx-%#lx) for rid %x of %s\n",
+ "allocated type %d (%#jx-%#jx) for rid %x of %s\n",
type, rman_get_start(r), rman_get_end(r),
*rid, pcib_child_name(dev));
return (r);
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c
index a23f06ce772a..4c6761fb279c 100644
--- a/sys/dev/ppc/ppc.c
+++ b/sys/dev/ppc/ppc.c
@@ -1699,7 +1699,7 @@ ppc_probe(device_t dev, int rid)
next_bios_ppc += 1;
if (bootverbose)
device_printf(dev,
- "parallel port found at 0x%lx\n", port);
+ "parallel port found at 0x%jx\n", port);
}
#else
if ((next_bios_ppc < BIOS_MAX_PPC) &&
@@ -1707,7 +1707,7 @@ ppc_probe(device_t dev, int rid)
port = *(BIOS_PORTS + next_bios_ppc++);
if (bootverbose)
device_printf(dev,
- "parallel port found at 0x%lx\n", port);
+ "parallel port found at 0x%jx\n", port);
} else {
device_printf(dev, "parallel port not found.\n");
return (ENXIO);
diff --git a/sys/dev/proto/proto_bus_isa.c b/sys/dev/proto/proto_bus_isa.c
index e7438bf1b4d5..4dad91cc7cf9 100644
--- a/sys/dev/proto/proto_bus_isa.c
+++ b/sys/dev/proto/proto_bus_isa.c
@@ -80,7 +80,7 @@ proto_isa_probe(device_t dev)
return (ENODEV);
sb = sbuf_new_auto();
- sbuf_printf(sb, "%s:%#lx", proto_isa_prefix, rman_get_start(res));
+ sbuf_printf(sb, "%s:%#jx", proto_isa_prefix, rman_get_start(res));
sbuf_finish(sb);
device_set_desc_copy(dev, sbuf_data(sb));
sbuf_delete(sb);
diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c
index f3bb89a9b4c1..2ae39cf07628 100644
--- a/sys/dev/sound/isa/ad1816.c
+++ b/sys/dev/sound/isa/ad1816.c
@@ -624,11 +624,11 @@ ad1816_attach(device_t dev)
goto no;
}
if (ad1816->drq2)
- snprintf(status2, SND_STATUSLEN, ":%ld", rman_get_start(ad1816->drq2));
+ snprintf(status2, SND_STATUSLEN, ":%jd", rman_get_start(ad1816->drq2));
else
status2[0] = '\0';
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %jd%s bufsz %u %s",
rman_get_start(ad1816->io_base),
rman_get_start(ad1816->irq),
rman_get_start(ad1816->drq1),
diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c
index 5fd95297df79..e4032de40924 100644
--- a/sys/dev/sound/isa/ess.c
+++ b/sys/dev/sound/isa/ess.c
@@ -867,12 +867,12 @@ ess_attach(device_t dev)
}
if (sc->drq2)
- snprintf(buf, SND_STATUSLEN, ":%ld", rman_get_start(sc->drq2));
+ snprintf(buf, SND_STATUSLEN, ":%jd", rman_get_start(sc->drq2));
else
buf[0] = '\0';
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u %s",
- rman_get_start(sc->io_base), rman_get_start(sc->irq),
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %jd%s bufsz %u %s",
+ rman_get_start(sc->io_base), rman_get_start(sc->irq),
rman_get_start(sc->drq1), buf, sc->bufsize,
PCM_KLDSTRING(snd_ess));
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c
index 7aaef06352a5..62f66176425c 100644
--- a/sys/dev/sound/isa/mss.c
+++ b/sys/dev/sound/isa/mss.c
@@ -1326,7 +1326,7 @@ mss_probe(device_t dev)
}
tmp &= 0x3f;
if (!(tmp == 0x04 || tmp == 0x0f || tmp == 0x00 || tmp == 0x05)) {
- BVDDB(printf("No MSS signature detected on port 0x%lx (0x%x)\n",
+ BVDDB(printf("No MSS signature detected on port 0x%jx (0x%x)\n",
rman_get_start(mss->io_base), tmpx));
goto no;
}
@@ -1767,7 +1767,7 @@ mss_doattach(device_t dev, struct mss_info *mss)
else
status2[0] = '\0';
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %d%s bufsz %u",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %d%s bufsz %u",
rman_get_start(mss->io_base), rman_get_start(mss->irq), pdma, status2, mss->bufsize);
if (pcm_register(dev, mss, 1, 1)) goto no;
diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c
index 536de7796e48..946c6bf5130d 100644
--- a/sys/dev/sound/isa/sb16.c
+++ b/sys/dev/sound/isa/sb16.c
@@ -854,11 +854,11 @@ sb16_attach(device_t dev)
}
if (!(pcm_getflags(dev) & SD_F_SIMPLEX))
- snprintf(status2, SND_STATUSLEN, ":%ld", rman_get_start(sb->drq2));
+ snprintf(status2, SND_STATUSLEN, ":%jd", rman_get_start(sb->drq2));
else
status2[0] = '\0';
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld%s bufsz %u %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %jd%s bufsz %u %s",
rman_get_start(sb->io_base), rman_get_start(sb->irq),
rman_get_start(sb->drq1), status2, sb->bufsize,
PCM_KLDSTRING(snd_sb16));
diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c
index 7c39515d42ab..c9ed746e3f41 100644
--- a/sys/dev/sound/isa/sb8.c
+++ b/sys/dev/sound/isa/sb8.c
@@ -749,7 +749,7 @@ sb_attach(device_t dev)
goto no;
}
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %ld bufsz %u %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd drq %jd bufsz %u %s",
rman_get_start(sb->io_base), rman_get_start(sb->irq),
rman_get_start(sb->drq), sb->bufsize, PCM_KLDSTRING(snd_sb8));
diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c
index b214333a9ca7..bb38749aa000 100644
--- a/sys/dev/sound/pci/als4000.c
+++ b/sys/dev/sound/pci/als4000.c
@@ -848,7 +848,7 @@ als_pci_attach(device_t dev)
pcm_addchan(dev, PCMDIR_PLAY, &alspchan_class, sc);
pcm_addchan(dev, PCMDIR_REC, &alsrchan_class, sc);
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_als4000));
pcm_setstatus(dev, status);
return 0;
diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c
index 8df67aad4874..ca9a539aa6c4 100644
--- a/sys/dev/sound/pci/atiixp.c
+++ b/sys/dev/sound/pci/atiixp.c
@@ -1097,7 +1097,7 @@ atiixp_chip_post_init(void *arg)
"polling", CTLTYPE_INT | CTLFLAG_RW, sc->dev, sizeof(sc->dev),
sysctl_atiixp_polling, "I", "Enable polling mode");
- snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at memory 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),
PCM_KLDSTRING(snd_atiixp));
diff --git a/sys/dev/sound/pci/aureal.c b/sys/dev/sound/pci/aureal.c
index 67af07570f78..f990f4340ecf 100644
--- a/sys/dev/sound/pci/aureal.c
+++ b/sys/dev/sound/pci/aureal.c
@@ -645,7 +645,7 @@ au_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s",
(type[0] == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(reg[0]), rman_get_start(irq),PCM_KLDSTRING(snd_aureal));
diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c
index 6075a923ebe1..9e6265997cbf 100644
--- a/sys/dev/sound/pci/cmi.c
+++ b/sys/dev/sound/pci/cmi.c
@@ -995,7 +995,7 @@ cmi_attach(device_t dev)
pcm_addchan(dev, PCMDIR_PLAY, &cmichan_class, sc);
pcm_addchan(dev, PCMDIR_REC, &cmichan_class, sc);
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cmi));
pcm_setstatus(dev, status);
diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c
index 929b9d765821..4750daf3b969 100644
--- a/sys/dev/sound/pci/cs4281.c
+++ b/sys/dev/sound/pci/cs4281.c
@@ -849,7 +849,7 @@ cs4281_pci_attach(device_t dev)
pcm_addchan(dev, PCMDIR_PLAY, &cs4281chan_class, sc);
pcm_addchan(dev, PCMDIR_REC, &cs4281chan_class, sc);
- snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s",
(sc->regtype == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_cs4281));
pcm_setstatus(dev, status);
diff --git a/sys/dev/sound/pci/csapcm.c b/sys/dev/sound/pci/csapcm.c
index 89ffd2b66ec0..5a1544da7de0 100644
--- a/sys/dev/sound/pci/csapcm.c
+++ b/sys/dev/sound/pci/csapcm.c
@@ -821,7 +821,7 @@ pcmcsa_attach(device_t dev)
return (ENXIO);
}
- snprintf(status, SND_STATUSLEN, "at irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at irq %jd %s",
rman_get_start(resp->irq),PCM_KLDSTRING(snd_csa));
/* Enable interrupt. */
diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c
index 302271a2eb2a..23f3d5cfe915 100644
--- a/sys/dev/sound/pci/ds1.c
+++ b/sys/dev/sound/pci/ds1.c
@@ -1010,7 +1010,7 @@ ds_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at memory 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_ds1));
if (pcm_register(dev, sc, DS1_CHANS, 2))
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index c4a13f3a7453..f1d77eebd88b 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -2132,7 +2132,7 @@ emu_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(sc->reg), rman_get_start(sc->irq),
PCM_KLDSTRING(snd_emu10k1));
diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c
index b2eaf2cb7fd6..bd97ab848cff 100644
--- a/sys/dev/sound/pci/emu10kx.c
+++ b/sys/dev/sound/pci/emu10kx.c
@@ -3225,7 +3225,7 @@ emu_pci_attach(device_t dev)
device_printf(dev, "unable to create control device\n");
goto bad;
}
- snprintf(status, 255, "rev %d at io 0x%lx irq %ld", sc->rev, rman_get_start(sc->reg), rman_get_start(sc->irq));
+ snprintf(status, 255, "rev %d at io 0x%jx irq %jd", sc->rev, rman_get_start(sc->reg), rman_get_start(sc->irq));
/* Voices */
for (i = 0; i < NUM_G; i++) {
diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c
index c4eaa10557f8..9272a95c984f 100644
--- a/sys/dev/sound/pci/envy24.c
+++ b/sys/dev/sound/pci/envy24.c
@@ -2599,7 +2599,7 @@ envy24_pci_attach(device_t dev)
/* set status iformation */
snprintf(status, SND_STATUSLEN,
- "at io 0x%lx:%ld,0x%lx:%ld,0x%lx:%ld,0x%lx:%ld irq %ld",
+ "at io 0x%jx:%jd,0x%jx:%jd,0x%jx:%jd,0x%jx:%jd irq %jd",
rman_get_start(sc->cs),
rman_get_end(sc->cs) - rman_get_start(sc->cs) + 1,
rman_get_start(sc->ddma),
diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c
index 85a36c2cfeb2..fe1fb1906481 100644
--- a/sys/dev/sound/pci/envy24ht.c
+++ b/sys/dev/sound/pci/envy24ht.c
@@ -2507,7 +2507,7 @@ envy24ht_pci_attach(device_t dev)
/* set status iformation */
snprintf(status, SND_STATUSLEN,
- "at io 0x%lx:%ld,0x%lx:%ld irq %ld",
+ "at io 0x%jx:%jd,0x%jx:%jd irq %jd",
rman_get_start(sc->cs),
rman_get_end(sc->cs) - rman_get_start(sc->cs) + 1,
rman_get_start(sc->mt),
diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c
index 0dd88a82e84b..7032c84f6e9e 100644
--- a/sys/dev/sound/pci/es137x.c
+++ b/sys/dev/sound/pci/es137x.c
@@ -1856,7 +1856,7 @@ es_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s",
(es->regtype == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(es->reg), rman_get_start(es->irq),
PCM_KLDSTRING(snd_es137x));
diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c
index 82b1d7780bcb..252e71482500 100644
--- a/sys/dev/sound/pci/fm801.c
+++ b/sys/dev/sound/pci/fm801.c
@@ -639,7 +639,7 @@ fm801_pci_attach(device_t dev)
goto oops;
}
- snprintf(status, 64, "at %s 0x%lx irq %ld %s",
+ snprintf(status, 64, "at %s 0x%jx irq %jd %s",
(fm801->regtype == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(fm801->reg), rman_get_start(fm801->irq),PCM_KLDSTRING(snd_fm801));
diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c
index dc62377d51ff..d84712d4dbe9 100644
--- a/sys/dev/sound/pci/hdspe-pcm.c
+++ b/sys/dev/sound/pci/hdspe-pcm.c
@@ -668,7 +668,7 @@ hdspe_pcm_attach(device_t dev)
scp->chnum++;
}
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(scp->sc->cs),
rman_get_start(scp->sc->irq),
PCM_KLDSTRING(snd_hdspe));
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c
index 4895ad626a23..61b6781662bc 100644
--- a/sys/dev/sound/pci/ich.c
+++ b/sys/dev/sound/pci/ich.c
@@ -687,7 +687,7 @@ ich_setstatus(struct sc_info *sc)
char status[SND_STATUSLEN];
snprintf(status, SND_STATUSLEN,
- "at io 0x%lx, 0x%lx irq %ld bufsz %u %s",
+ "at io 0x%jx, 0x%jx irq %jd bufsz %u %s",
rman_get_start(sc->nambar), rman_get_start(sc->nabmbar),
rman_get_start(sc->irq), sc->bufsz,PCM_KLDSTRING(snd_ich));
diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c
index c7cbb3581f6b..fbadf3b3f7bb 100644
--- a/sys/dev/sound/pci/maestro.c
+++ b/sys/dev/sound/pci/maestro.c
@@ -1917,7 +1917,7 @@ agg_attach(device_t dev)
adjust_pchbase(ess->pch, ess->playchns, ess->bufsz);
snprintf(status, SND_STATUSLEN,
- "port 0x%lx-0x%lx irq %ld at device %d.%d on pci%d",
+ "port 0x%jx-0x%jx irq %jd at device %d.%d on pci%d",
rman_get_start(reg), rman_get_end(reg), rman_get_start(irq),
pci_get_slot(dev), pci_get_function(dev), pci_get_bus(dev));
pcm_setstatus(dev, status);
diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c
index 20a9bda70459..5bab021fdf1a 100644
--- a/sys/dev/sound/pci/maestro3.c
+++ b/sys/dev/sound/pci/maestro3.c
@@ -1440,7 +1440,7 @@ m3_pci_attach(device_t dev)
goto bad;
}
}
- snprintf(status, SND_STATUSLEN, "at %s 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at %s 0x%jx irq %jd %s",
(sc->regtype == SYS_RES_IOPORT)? "io" : "memory",
rman_get_start(sc->reg), rman_get_start(sc->irq),
PCM_KLDSTRING(snd_maestro3));
diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c
index 71c1bf14eb8f..8a78bf7653f8 100644
--- a/sys/dev/sound/pci/neomagic.c
+++ b/sys/dev/sound/pci/neomagic.c
@@ -702,7 +702,7 @@ nm_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, SND_STATUSLEN, "at memory 0x%lx, 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at memory 0x%jx, 0x%jx irq %jd %s",
rman_get_start(sc->buf), rman_get_start(sc->reg),
rman_get_start(sc->irq),PCM_KLDSTRING(snd_neomagic));
diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c
index 534d8106cb2a..dc46ac862258 100644
--- a/sys/dev/sound/pci/solo.c
+++ b/sys/dev/sound/pci/solo.c
@@ -1051,7 +1051,7 @@ ess_attach(device_t dev)
if (mixer_init(dev, &solomixer_class, sc))
goto no;
- snprintf(status, SND_STATUSLEN, "at io 0x%lx,0x%lx,0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx,0x%jx,0x%jx irq %jd %s",
rman_get_start(sc->io), rman_get_start(sc->sb), rman_get_start(sc->vc),
rman_get_start(sc->irq),PCM_KLDSTRING(snd_solo));
diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c
index ef488906e469..32ddd00b9f01 100644
--- a/sys/dev/sound/pci/t4dwave.c
+++ b/sys/dev/sound/pci/t4dwave.c
@@ -948,7 +948,7 @@ tr_pci_attach(device_t dev)
goto bad;
}
- snprintf(status, 64, "at io 0x%lx irq %ld %s",
+ snprintf(status, 64, "at io 0x%jx irq %jd %s",
rman_get_start(tr->reg), rman_get_start(tr->irq),PCM_KLDSTRING(snd_t4dwave));
if (pcm_register(dev, tr, dacn, 1))
diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c
index 0694cefdce50..45fe175ac67d 100644
--- a/sys/dev/sound/pci/via8233.c
+++ b/sys/dev/sound/pci/via8233.c
@@ -1348,7 +1348,7 @@ via_attach(device_t dev)
ac97_setextmode(via->codec, ext);
}
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(via->reg), rman_get_start(via->irq),
PCM_KLDSTRING(snd_via8233));
diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c
index 6b615e870a79..4484d6e51fca 100644
--- a/sys/dev/sound/pci/via82c686.c
+++ b/sys/dev/sound/pci/via82c686.c
@@ -590,7 +590,7 @@ via_attach(device_t dev)
NSEGS * sizeof(struct via_dma_op), dma_cb, via, 0) != 0)
goto bad;
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(via->reg), rman_get_start(via->irq),
PCM_KLDSTRING(snd_via82c686));
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c
index f16e3ef31d35..22c84c8128a2 100644
--- a/sys/dev/sound/pci/vibes.c
+++ b/sys/dev/sound/pci/vibes.c
@@ -815,7 +815,7 @@ sv_attach(device_t dev) {
((mu - ml) % 0x200)) {
device_printf(dev, "sv_attach: resource assumptions not met "
"(midi 0x%08lx, games 0x%08lx)\n",
- midi_start, games_start);
+ (u_long)midi_start, (u_long)games_start);
goto fail;
}
@@ -874,7 +874,7 @@ sv_attach(device_t dev) {
pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc);
pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc);
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s",
+ snprintf(status, SND_STATUSLEN, "at io 0x%jx irq %jd %s",
rman_get_start(sc->enh_reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_vibes));
pcm_setstatus(dev, status);
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c
index 7146a25755d6..6414d335dd33 100644
--- a/sys/dev/wl/if_wl.c
+++ b/sys/dev/wl/if_wl.c
@@ -495,7 +495,7 @@ wlattach(device_t device)
}
#ifdef WLDEBUG
- printf("wlattach: base %lx, unit %d\n", rman_get_start(sc->res_ioport),
+ printf("wlattach: base %jx, unit %d\n", rman_get_start(sc->res_ioport),
device_get_unit(device));
#endif
diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c
index d6ccae9ea5b9..e18af8ca2b2e 100644
--- a/sys/dev/xe/if_xe.c
+++ b/sys/dev/xe/if_xe.c
@@ -1984,7 +1984,7 @@ xe_activate(device_t dev)
sc->port_res);
start = (rman_get_start(sc->port_res) + 15) & ~0xf;
} while (1);
- DEVPRINTF(1, (dev, "RealPort port 0x%0lx, size 0x%0lx\n",
+ DEVPRINTF(1, (dev, "RealPort port 0x%0jx, size 0x%0jx\n",
bus_get_resource_start(dev, SYS_RES_IOPORT, sc->port_rid),
bus_get_resource_count(dev, SYS_RES_IOPORT, sc->port_rid)));
} else if (sc->ce2) {
@@ -2024,7 +2024,7 @@ xe_activate(device_t dev)
sc->port_res);
sc->port_res = NULL;
}
- DEVPRINTF(1, (dev, "CEM2/CEM3 port 0x%0lx, size 0x%0lx\n",
+ DEVPRINTF(1, (dev, "CEM2/CEM3 port 0x%0jx, size 0x%0jx\n",
bus_get_resource_start(dev, SYS_RES_IOPORT, sc->port_rid),
bus_get_resource_count(dev, SYS_RES_IOPORT, sc->port_rid)));
}
diff --git a/sys/dev/xe/if_xe_pccard.c b/sys/dev/xe/if_xe_pccard.c
index bbe625338f32..fb2cff608e0a 100644
--- a/sys/dev/xe/if_xe_pccard.c
+++ b/sys/dev/xe/if_xe_pccard.c
@@ -140,7 +140,7 @@ xe_cemfix(device_t dev)
DEVPRINTF(2, (dev, "cemfix\n"));
- DEVPRINTF(1, (dev, "CEM I/O port 0x%0lx, size 0x%0lx\n",
+ DEVPRINTF(1, (dev, "CEM I/O port 0x%0jx, size 0x%0jx\n",
bus_get_resource_start(dev, SYS_RES_IOPORT, sc->port_rid),
bus_get_resource_count(dev, SYS_RES_IOPORT, sc->port_rid)));
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c
index 41f1f3458d65..9bbec643b0e2 100644
--- a/sys/kern/subr_rman.c
+++ b/sys/kern/subr_rman.c
@@ -159,7 +159,7 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end)
struct resource_i *r, *s, *t;
int rv = 0;
- DPRINTF(("rman_manage_region: <%s> request: start %#lx, end %#lx\n",
+ DPRINTF(("rman_manage_region: <%s> request: start %#jx, end %#jx\n",
rm->rm_descr, start, end));
if (start < rm->rm_start || end > rm->rm_end)
return EINVAL;
@@ -174,7 +174,7 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end)
/* Skip entries before us. */
TAILQ_FOREACH(s, &rm->rm_list, r_link) {
- if (s->r_end == ULONG_MAX)
+ if (s->r_end == ~0)
break;
if (s->r_end + 1 >= r->r_start)
break;
@@ -444,8 +444,8 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
rv = NULL;
- DPRINTF(("rman_reserve_resource_bound: <%s> request: [%#lx, %#lx], "
- "length %#lx, flags %u, device %s\n", rm->rm_descr, start, end,
+ DPRINTF(("rman_reserve_resource_bound: <%s> request: [%#jx, %#jx], "
+ "length %#jx, flags %x, device %s\n", rm->rm_descr, start, end,
count, flags,
dev == NULL ? "<null>" : device_get_nameunit(dev)));
KASSERT((flags & RF_FIRSTSHARE) == 0,
@@ -454,19 +454,29 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
mtx_lock(rm->rm_mtx);
+ r = TAILQ_FIRST(&rm->rm_list);
+ if (r == NULL) {
+ DPRINTF(("NULL list head\n"));
+ } else {
+ DPRINTF(("rman_reserve_resource_bound: trying %#jx <%#jx,%#jx>\n",
+ r->r_end, start, count-1));
+ }
for (r = TAILQ_FIRST(&rm->rm_list);
r && r->r_end < start + count - 1;
- r = TAILQ_NEXT(r, r_link))
+ r = TAILQ_NEXT(r, r_link)) {
;
+ DPRINTF(("rman_reserve_resource_bound: tried %#jx <%#jx,%#jx>\n",
+ r->r_end, start, count-1));
+ }
if (r == NULL) {
DPRINTF(("could not find a region\n"));
goto out;
}
- amask = (1ul << RF_ALIGNMENT(flags)) - 1;
- KASSERT(start <= ULONG_MAX - amask,
- ("start (%#lx) + amask (%#lx) would wrap around", start, amask));
+ amask = (1ull << RF_ALIGNMENT(flags)) - 1;
+ KASSERT(start <= RM_MAX_END - amask,
+ ("start (%#jx) + amask (%#jx) would wrap around", start, amask));
/* If bound is 0, bmask will also be 0 */
bmask = ~(bound - 1);
@@ -474,18 +484,18 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
* First try to find an acceptable totally-unshared region.
*/
for (s = r; s; s = TAILQ_NEXT(s, r_link)) {
- DPRINTF(("considering [%#lx, %#lx]\n", s->r_start, s->r_end));
+ DPRINTF(("considering [%#jx, %#jx]\n", s->r_start, s->r_end));
/*
* The resource list is sorted, so there is no point in
* searching further once r_start is too large.
*/
if (s->r_start > end - (count - 1)) {
- DPRINTF(("s->r_start (%#lx) + count - 1> end (%#lx)\n",
+ DPRINTF(("s->r_start (%#jx) + count - 1> end (%#jx)\n",
s->r_start, end));
break;
}
- if (s->r_start > ULONG_MAX - amask) {
- DPRINTF(("s->r_start (%#lx) + amask (%#lx) too large\n",
+ if (s->r_start > RM_MAX_END - amask) {
+ DPRINTF(("s->r_start (%#jx) + amask (%#jx) too large\n",
s->r_start, amask));
break;
}
@@ -493,7 +503,7 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
DPRINTF(("region is allocated\n"));
continue;
}
- rstart = ulmax(s->r_start, start);
+ rstart = ummax(s->r_start, start);
/*
* Try to find a region by adjusting to boundary and alignment
* until both conditions are satisfied. This is not an optimal
@@ -505,16 +515,16 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
rstart += bound - (rstart & ~bmask);
} while ((rstart & amask) != 0 && rstart < end &&
rstart < s->r_end);
- rend = ulmin(s->r_end, ulmax(rstart + count - 1, end));
+ rend = ummin(s->r_end, ummax(rstart + count - 1, end));
if (rstart > rend) {
DPRINTF(("adjusted start exceeds end\n"));
continue;
}
- DPRINTF(("truncated region: [%#lx, %#lx]; size %#lx (requested %#lx)\n",
+ DPRINTF(("truncated region: [%#jx, %#jx]; size %#jx (requested %#jx)\n",
rstart, rend, (rend - rstart + 1), count));
if ((rend - rstart + 1) >= count) {
- DPRINTF(("candidate region: [%#lx, %#lx], size %#lx\n",
+ DPRINTF(("candidate region: [%#jx, %#jx], size %#jx\n",
rstart, rend, (rend - rstart + 1)));
if ((s->r_end - s->r_start + 1) == count) {
DPRINTF(("candidate region is entire chunk\n"));
@@ -545,7 +555,7 @@ rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end,
if (s->r_start < rv->r_start && s->r_end > rv->r_end) {
DPRINTF(("splitting region in three parts: "
- "[%#lx, %#lx]; [%#lx, %#lx]; [%#lx, %#lx]\n",
+ "[%#jx, %#jx]; [%#jx, %#jx]; [%#jx, %#jx]\n",
s->r_start, rv->r_start - 1,
rv->r_start, rv->r_end,
rv->r_end + 1, s->r_end));
@@ -1032,8 +1042,8 @@ dump_rman_header(struct rman *rm)
if (db_pager_quit)
return;
- db_printf("rman %p: %s (0x%lx-0x%lx full range)\n",
- rm, rm->rm_descr, rm->rm_start, rm->rm_end);
+ db_printf("rman %p: %s (0x%jx-0x%jx full range)\n",
+ rm, rm->rm_descr, (rman_res_t)rm->rm_start, (rman_res_t)rm->rm_end);
}
static void
@@ -1051,7 +1061,7 @@ dump_rman(struct rman *rm)
devname = "nomatch";
} else
devname = NULL;
- db_printf(" 0x%lx-0x%lx (RID=%d) ",
+ db_printf(" 0x%jx-0x%jx (RID=%d) ",
r->r_start, r->r_end, r->r_rid);
if (devname != NULL)
db_printf("(%s)\n", devname);
diff --git a/sys/mips/atheros/apb.c b/sys/mips/atheros/apb.c
index 8d230a7f1bf6..56475b7404e7 100644
--- a/sys/mips/atheros/apb.c
+++ b/sys/mips/atheros/apb.c
@@ -178,7 +178,7 @@ apb_alloc_resource(device_t bus, device_t child, int type, int *rid,
passthrough = (device_get_parent(child) != bus);
rle = NULL;
- dprintf("%s: entry (%p, %p, %d, %d, %p, %p, %ld, %d)\n",
+ dprintf("%s: entry (%p, %p, %d, %d, %p, %p, %jd, %d)\n",
__func__, bus, child, type, *rid, (void *)(intptr_t)start,
(void *)(intptr_t)end, count, flags);
diff --git a/sys/mips/mips/nexus.c b/sys/mips/mips/nexus.c
index 617d842db28f..5aba92d800c9 100644
--- a/sys/mips/mips/nexus.c
+++ b/sys/mips/mips/nexus.c
@@ -275,7 +275,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
struct rman *rm;
int isdefault, needactivate, passthrough;
- dprintf("%s: entry (%p, %p, %d, %p, %p, %p, %ld, %d)\n",
+ dprintf("%s: entry (%p, %p, %d, %p, %p, %p, %jd, %d)\n",
__func__, bus, child, type, rid, (void *)(intptr_t)start,
(void *)(intptr_t)end, count, flags);
dprintf("%s: requested rid is %d\n", __func__, *rid);
@@ -350,7 +350,7 @@ nexus_set_resource(device_t dev, device_t child, int type, int rid,
struct resource_list *rl = &ndev->nx_resources;
struct resource_list_entry *rle;
- dprintf("%s: entry (%p, %p, %d, %d, %p, %ld)\n",
+ dprintf("%s: entry (%p, %p, %d, %d, %p, %jd)\n",
__func__, dev, child, type, rid, (void *)(intptr_t)start, count);
rle = resource_list_add(rl, type, rid, start, start + count - 1,
diff --git a/sys/mips/nlm/xlp_pci.c b/sys/mips/nlm/xlp_pci.c
index fee23cdd402d..863c6aa553cb 100644
--- a/sys/mips/nlm/xlp_pci.c
+++ b/sys/mips/nlm/xlp_pci.c
@@ -433,7 +433,7 @@ mips_platform_pcib_setup_intr(device_t dev, device_t child,
if (error)
return error;
if (rman_get_start(irq) != rman_get_end(irq)) {
- device_printf(dev, "Interrupt allocation %lu != %lu\n",
+ device_printf(dev, "Interrupt allocation %ju != %ju\n",
rman_get_start(irq), rman_get_end(irq));
return (EINVAL);
}
diff --git a/sys/mips/nlm/xlp_simplebus.c b/sys/mips/nlm/xlp_simplebus.c
index 3ffb19a681eb..413775b456d6 100644
--- a/sys/mips/nlm/xlp_simplebus.c
+++ b/sys/mips/nlm/xlp_simplebus.c
@@ -209,7 +209,7 @@ xlp_simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid,
if (j == sc->nranges && sc->nranges != 0) {
if (bootverbose)
device_printf(bus, "Could not map resource "
- "%#lx-%#lx\n", start, end);
+ "%#jx-%#jx\n", start, end);
return (NULL);
}
}
@@ -235,7 +235,7 @@ xlp_simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid,
} else {
if (bootverbose)
device_printf(bus, "Invalid MEM range"
- "%#lx-%#lx\n", start, end);
+ "%#jx-%#jx\n", start, end);
return (NULL);
}
break;
diff --git a/sys/mips/rmi/iodi.c b/sys/mips/rmi/iodi.c
index da0405d3d288..d1f74e198fba 100644
--- a/sys/mips/rmi/iodi.c
+++ b/sys/mips/rmi/iodi.c
@@ -134,17 +134,17 @@ iodi_alloc_resource(device_t bus, device_t child, int type, int *rid,
#ifdef DEBUG
switch (type) {
case SYS_RES_IRQ:
- device_printf(bus, "IRQ resource - for %s %lx-%lx\n",
+ device_printf(bus, "IRQ resource - for %s %jx-%jx\n",
device_get_nameunit(child), start, end);
break;
case SYS_RES_IOPORT:
- device_printf(bus, "IOPORT resource - for %s %lx-%lx\n",
+ device_printf(bus, "IOPORT resource - for %s %jx-%jx\n",
device_get_nameunit(child), start, end);
break;
case SYS_RES_MEMORY:
- device_printf(bus, "MEMORY resource - for %s %lx-%lx\n",
+ device_printf(bus, "MEMORY resource - for %s %jx-%jx\n",
device_get_nameunit(child), start, end);
break;
}
diff --git a/sys/mips/rmi/xlr_pci.c b/sys/mips/rmi/xlr_pci.c
index 194213b2e830..53581a6fed8d 100644
--- a/sys/mips/rmi/xlr_pci.c
+++ b/sys/mips/rmi/xlr_pci.c
@@ -464,7 +464,7 @@ mips_platform_pci_setup_intr(device_t dev, device_t child,
if (error)
return error;
if (rman_get_start(irq) != rman_get_end(irq)) {
- device_printf(dev, "Interrupt allocation %lu != %lu\n",
+ device_printf(dev, "Interrupt allocation %ju != %ju\n",
rman_get_start(irq), rman_get_end(irq));
return (EINVAL);
}
diff --git a/sys/powerpc/mpc85xx/lbc.c b/sys/powerpc/mpc85xx/lbc.c
index a94a84146c44..37e3ed054113 100644
--- a/sys/powerpc/mpc85xx/lbc.c
+++ b/sys/powerpc/mpc85xx/lbc.c
@@ -718,8 +718,8 @@ lbc_alloc_resource(device_t bus, device_t child, int type, int *rid,
res = rman_reserve_resource(rm, start, end, count, flags, child);
if (res == NULL) {
- device_printf(bus, "failed to reserve resource %#lx - %#lx "
- "(%#lx)\n", start, end, count);
+ device_printf(bus, "failed to reserve resource %#jx - %#jx "
+ "(%#jx)\n", start, end, count);
return (NULL);
}
@@ -749,8 +749,8 @@ lbc_print_child(device_t dev, device_t child)
rv = 0;
rv += bus_print_child_header(dev, child);
- rv += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#lx");
- rv += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld");
+ rv += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#jx");
+ rv += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%jd");
rv += bus_print_child_footer(dev, child);
return (rv);
diff --git a/sys/powerpc/ofw/ofw_pci.c b/sys/powerpc/ofw/ofw_pci.c
index 0ca5bc0ff487..20aa81f38fee 100644
--- a/sys/powerpc/ofw/ofw_pci.c
+++ b/sys/powerpc/ofw/ofw_pci.c
@@ -384,10 +384,10 @@ ofw_pci_activate_resource(device_t bus, device_t child, int type, int rid,
}
if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) {
struct ofw_pci_range *rp;
- vm_offset_t start;
+ vm_paddr_t start;
int space;
- start = (vm_offset_t)rman_get_start(res);
+ start = (vm_paddr_t)rman_get_start(res);
/*
* Map this through the ranges list
@@ -416,8 +416,8 @@ ofw_pci_activate_resource(device_t bus, device_t child, int type, int rid,
}
if (bootverbose)
- printf("ofw_pci mapdev: start %zx, len %ld\n", start,
- rman_get_size(res));
+ printf("ofw_pci mapdev: start %jx, len %jd\n",
+ (rman_res_t)start, rman_get_size(res));
p = pmap_mapdev(start, (vm_size_t)rman_get_size(res));
if (p == NULL)
diff --git a/sys/powerpc/powermac/uninorth.c b/sys/powerpc/powermac/uninorth.c
index e34c9d8325ad..7cf490ebc1b3 100644
--- a/sys/powerpc/powermac/uninorth.c
+++ b/sys/powerpc/powermac/uninorth.c
@@ -591,7 +591,7 @@ unin_chip_activate_resource(device_t bus, device_t child, int type, int rid,
start = (vm_offset_t) rman_get_start(res);
if (bootverbose)
- printf("unin mapdev: start %zx, len %ld\n", start,
+ printf("unin mapdev: start %zx, len %jd\n", start,
rman_get_size(res));
p = pmap_mapdev(start, (vm_size_t) rman_get_size(res));
diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c
index 1ad118c6daaf..f5a3da8eb274 100644
--- a/sys/powerpc/powerpc/nexus.c
+++ b/sys/powerpc/powerpc/nexus.c
@@ -203,7 +203,7 @@ nexus_activate_resource(device_t bus __unused, device_t child __unused,
start = (vm_paddr_t) rman_get_start(r);
if (bootverbose)
- printf("nexus mapdev: start %jx, len %ld\n",
+ printf("nexus mapdev: start %jx, len %jd\n",
(uintmax_t)start, rman_get_size(r));
p = pmap_mapdev(start, (vm_size_t) rman_get_size(r));
diff --git a/sys/sparc64/pci/apb.c b/sys/sparc64/pci/apb.c
index ba3643c13c0c..55f131382c33 100644
--- a/sys/sparc64/pci/apb.c
+++ b/sys/sparc64/pci/apb.c
@@ -136,7 +136,7 @@ apb_map_print(uint8_t map, rman_res_t scale)
for (first = 1, i = 0; i < 8; i++) {
if ((map & (1 << i)) != 0) {
- printf("%s0x%lx-0x%lx", first ? "" : ", ",
+ printf("%s0x%jx-0x%jx", first ? "" : ", ",
i * scale, (i + 1) * scale - 1);
first = 0;
}
@@ -253,26 +253,26 @@ apb_alloc_resource(device_t dev, device_t child, int type, int *rid,
case SYS_RES_IOPORT:
if (!apb_checkrange(sc->sc_iomap, APB_IO_SCALE, start, end)) {
device_printf(dev, "device %s requested unsupported "
- "I/O range 0x%lx-0x%lx\n",
+ "I/O range 0x%jx-0x%jx\n",
device_get_nameunit(child), start, end);
return (NULL);
}
if (bootverbose)
device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device "
- "%s requested decoded I/O range 0x%lx-0x%lx\n",
+ "%s requested decoded I/O range 0x%jx-0x%jx\n",
device_get_nameunit(child), start, end);
break;
case SYS_RES_MEMORY:
if (!apb_checkrange(sc->sc_memmap, APB_MEM_SCALE, start,
end)) {
device_printf(dev, "device %s requested unsupported "
- "memory range 0x%lx-0x%lx\n",
+ "memory range 0x%jx-0x%jx\n",
device_get_nameunit(child), start, end);
return (NULL);
}
if (bootverbose)
device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device "
- "%s requested decoded memory range 0x%lx-0x%lx\n",
+ "%s requested decoded memory range 0x%jx-0x%jx\n",
device_get_nameunit(child), start, end);
break;
}
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index 3b3c16d3684e..16039a6da16b 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -112,6 +112,6 @@ typedef union {
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
-typedef unsigned long __rman_res_t;
+typedef __uintmax_t __rman_res_t;
#endif /* !_SYS__TYPES_H_ */
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 910857632a17..dc3b035eaa0f 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -58,7 +58,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1100102 /* Master, propagated to newvers */
+#define __FreeBSD_version 1100103 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
diff --git a/sys/x86/x86/io_apic.c b/sys/x86/x86/io_apic.c
index 44609e69344e..1a2cc3cf72e1 100644
--- a/sys/x86/x86/io_apic.c
+++ b/sys/x86/x86/io_apic.c
@@ -987,14 +987,6 @@ apic_add_resource(device_t dev, int rid, vm_paddr_t base, size_t length)
{
int error;
-#ifdef PAE
- /*
- * Resources use long's to track resources, so we can't
- * include memory regions above 4GB.
- */
- if (base >= ~0ul)
- return;
-#endif
error = bus_set_resource(dev, SYS_RES_MEMORY, rid, base, length);
if (error)
panic("apic_add_resource: resource %d failed set with %d", rid,
diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c
index 40f2b0b42eba..734d563cadf6 100644
--- a/usr.sbin/devinfo/devinfo.c
+++ b/usr.sbin/devinfo/devinfo.c
@@ -66,9 +66,9 @@ print_resource(struct devinfo_res *res)
rman = devinfo_handle_to_rman(res->dr_rman);
hexmode = (rman->dm_size > 1000) || (rman->dm_size == 0);
- printf(hexmode ? "0x%lx" : "%lu", res->dr_start);
+ printf(hexmode ? "0x%jx" : "%ju", res->dr_start);
if (res->dr_size > 1)
- printf(hexmode ? "-0x%lx" : "-%lu",
+ printf(hexmode ? "-0x%jx" : "-%ju",
res->dr_start + res->dr_size - 1);
}