Index: head/lib/libdevinfo/devinfo.h =================================================================== --- head/lib/libdevinfo/devinfo.h +++ head/lib/libdevinfo/devinfo.h @@ -56,8 +56,8 @@ struct devinfo_rman { devinfo_handle_t dm_handle; /* resource manager handle */ - unsigned long dm_start; /* resource start */ - unsigned long dm_size; /* resource size */ + rman_res_t dm_start; /* resource start */ + rman_res_t dm_size; /* resource size */ char *dm_desc; /* resource description */ }; @@ -67,8 +67,8 @@ devinfo_handle_t dr_rman; /* resource manager handle */ devinfo_handle_t dr_device; /* owning device */ - unsigned long dr_start; /* region start */ - unsigned long dr_size; /* region size */ + rman_res_t dr_start; /* region start */ + rman_res_t dr_size; /* region size */ /* XXX add flags */ }; Index: head/lib/libdevinfo/devinfo.3 =================================================================== --- head/lib/libdevinfo/devinfo.3 +++ head/lib/libdevinfo/devinfo.3 @@ -110,8 +110,8 @@ struct devinfo_rman { devinfo_handle_t dm_handle; /* resource manager handle */ - u_long dm_start; /* resource start */ - u_long dm_size; /* resource size */ + rman_res_t dm_start; /* resource start */ + rman_res_t dm_size; /* resource size */ char *dm_desc; /* resource description */ }; @@ -119,8 +119,8 @@ devinfo_handle_t dr_handle; /* resource handle */ devinfo_handle_t dr_rman; /* resource manager handle */ devinfo_handle_t dr_device; /* owning device */ - u_long dr_start; /* region start */ - u_long dr_size; /* region size */ + rman_res_t dr_start; /* region start */ + rman_res_t dr_size; /* region size */ }; .Ed .Pp Index: head/share/man/man9/bus_adjust_resource.9 =================================================================== --- head/share/man/man9/bus_adjust_resource.9 +++ head/share/man/man9/bus_adjust_resource.9 @@ -41,7 +41,8 @@ .In sys/rman.h .In machine/resource.h .Ft int -.Fn bus_adjust_resource "device_t dev" "int type" "struct resource *r" "u_long start" "u_long end" +.Fo bus_adjust_resource +.Fa "device_t dev" "int type" "struct resource *r" "rman_res_t start" "rman_res_t end" .Sh DESCRIPTION This function is used to ask the parent bus to adjust the resource range assigned to an allocated resource. Index: head/share/man/man9/bus_alloc_resource.9 =================================================================== --- head/share/man/man9/bus_alloc_resource.9 +++ head/share/man/man9/bus_alloc_resource.9 @@ -43,7 +43,10 @@ .In sys/rman.h .In machine/resource.h .Ft struct resource * -.Fn bus_alloc_resource "device_t dev" "int type" "int *rid" "u_long start" "u_long end" "u_long count" "u_int flags" +.Fo bus_alloc_resource +.Fa "device_t dev" "int type" "int *rid" "rman_res_t start" "rman_res_t end" +.Fa "rman_res_t count" "u_int flags" +.Fc .Ft struct resource * .Fn bus_alloc_resource_any "device_t dev" "int type" "int *rid" "u_int flags" .Sh DESCRIPTION Index: head/share/man/man9/bus_get_resource.9 =================================================================== --- head/share/man/man9/bus_get_resource.9 +++ head/share/man/man9/bus_get_resource.9 @@ -44,7 +44,7 @@ .In sys/rman.h .Ft int .Fo bus_get_resource -.Fa "device_t dev" "int type" "int rid" "u_long *startp" "u_long *countp" +.Fa "device_t dev" "int type" "int rid" "rman_res_t *startp" "rman_res_t *countp" .Fc .Sh DESCRIPTION The Index: head/share/man/man9/bus_set_resource.9 =================================================================== --- head/share/man/man9/bus_set_resource.9 +++ head/share/man/man9/bus_set_resource.9 @@ -43,7 +43,7 @@ .In machine/resource.h .Ft int .Fo bus_set_resource -.Fa "device_t dev" "int type" "int rid" "u_long start" "u_long count" +.Fa "device_t dev" "int type" "int rid" "rman_res_t start" "rman_res_t count" .Fc .Sh DESCRIPTION The Index: head/share/man/man9/rman.9 =================================================================== --- head/share/man/man9/rman.9 +++ head/share/man/man9/rman.9 @@ -65,7 +65,7 @@ .Ft int .Fn rman_activate_resource "struct resource *r" .Ft int -.Fn rman_adjust_resource "struct resource *r" "u_long start" "u_long end" +.Fn rman_adjust_resource "struct resource *r" "rman_res_t start" "rman_res_t end" .Ft int .Fn rman_await_resource "struct resource *r" "int pri2" "int timo" .Ft int @@ -79,32 +79,32 @@ .Ft int .Fn rman_is_region_manager "struct resource *r" "struct rman *rm" .Ft int -.Fn rman_manage_region "struct rman *rm" "u_long start" "u_long end" +.Fn rman_manage_region "struct rman *rm" "rman_res_t start" "rman_res_t end" .Ft int -.Fn rman_first_free_region "struct rman *rm" "u_long *start" "u_long *end" +.Fn rman_first_free_region "struct rman *rm" "rman_res_t *start" "rman_res_t *end" .Ft int -.Fn rman_last_free_region "struct rman *rm" "u_long *start" "u_long *end" +.Fn rman_last_free_region "struct rman *rm" "rman_res_t *start" "rman_res_t *end" .Ft int .Fn rman_release_resource "struct resource *r" .Ft "struct resource *" .Fo rman_reserve_resource -.Fa "struct rman *rm" "u_long start" "u_long end" "u_long count" +.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" .Fa "u_int flags" "struct device *dev" .Fc .Ft "struct resource *" .Fo rman_reserve_resource_bound -.Fa "struct rman *rm" "u_long start" "u_long end" "u_long count" -.Fa "u_long bound" "u_int flags" "struct device *dev" +.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count" +.Fa "rman_res_t bound" "u_int flags" "struct device *dev" .Fc .Ft uint32_t .Fn rman_make_alignment_flags "uint32_t size" -.Ft u_long +.Ft rman_res_t .Fn rman_get_start "struct resource *r" -.Ft u_long +.Ft rman_res_t .Fn rman_get_end "struct resource *r" .Ft "struct device *" .Fn rman_get_device "struct resource *r" -.Ft u_long +.Ft rman_res_t .Fn rman_get_size "struct resource *r" .Ft u_int .Fn rman_get_flags "struct resource *r" Index: head/sys/arm/arm/nexus.c =================================================================== --- head/sys/arm/arm/nexus.c +++ head/sys/arm/arm/nexus.c @@ -82,7 +82,7 @@ static int nexus_print_child(device_t, device_t); static device_t nexus_add_child(device_t, u_int, const char *, int); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, u_int); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); #ifdef ARM_INTRNG @@ -212,7 +212,7 @@ */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *rv; struct rman *rm; Index: head/sys/arm/at91/at91.c =================================================================== --- head/sys/arm/at91/at91.c +++ head/sys/arm/at91/at91.c @@ -147,7 +147,7 @@ static struct resource * at91_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct at91_softc *sc = device_get_softc(dev); struct resource_list_entry *rle; @@ -255,7 +255,7 @@ struct resource *r) { #if 0 - u_long p; + rman_res_t p; int error; if (type == SYS_RES_MEMORY) { Index: head/sys/arm/cavium/cns11xx/econa.c =================================================================== --- head/sys/arm/cavium/cns11xx/econa.c +++ head/sys/arm/cavium/cns11xx/econa.c @@ -408,7 +408,7 @@ static struct resource * econa_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct econa_softc *sc = device_get_softc(dev); struct resource_list_entry *rle; Index: head/sys/arm/mv/mv_localbus.c =================================================================== --- head/sys/arm/mv/mv_localbus.c +++ head/sys/arm/mv/mv_localbus.c @@ -100,7 +100,7 @@ static int localbus_print_child(device_t, device_t); static struct resource *localbus_alloc_resource(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); + int *, rman_res_t, rman_res_t, rman_res_t, u_int); static struct resource_list *localbus_get_resource_list(device_t, device_t); static ofw_bus_get_devinfo_t localbus_get_devinfo; @@ -332,7 +332,7 @@ static struct resource * localbus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct localbus_devinfo *di; struct resource_list_entry *rle; Index: head/sys/arm/mv/mv_pci.c =================================================================== --- head/sys/arm/mv/mv_pci.c +++ head/sys/arm/mv/mv_pci.c @@ -332,7 +332,7 @@ static int mv_pcib_attach(device_t); static struct resource *mv_pcib_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, u_int); static int mv_pcib_release_resource(device_t, device_t, int, int, struct resource *); static int mv_pcib_read_ivar(device_t, device_t, int, uintptr_t *); @@ -830,7 +830,7 @@ static struct resource * mv_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mv_pcib_softc *sc = device_get_softc(dev); struct rman *rm = NULL; Index: head/sys/arm/versatile/versatile_pci.c =================================================================== --- head/sys/arm/versatile/versatile_pci.c +++ head/sys/arm/versatile/versatile_pci.c @@ -305,7 +305,7 @@ static struct resource * versatile_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct versatile_pci_softc *sc = device_get_softc(bus); Index: head/sys/arm/xscale/i8134x/i81342.c =================================================================== --- head/sys/arm/xscale/i8134x/i81342.c +++ head/sys/arm/xscale/i8134x/i81342.c @@ -409,7 +409,7 @@ static struct resource * i81342_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct i81342_softc *sc = device_get_softc(dev); struct resource *rv; Index: head/sys/arm/xscale/i8134x/i81342_pci.c =================================================================== --- head/sys/arm/xscale/i8134x/i81342_pci.c +++ head/sys/arm/xscale/i8134x/i81342_pci.c @@ -328,7 +328,7 @@ static struct resource * i81342_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct i81342_pci_softc *sc = device_get_softc(bus); struct resource *rv; @@ -383,7 +383,7 @@ i81342_pci_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { - u_long p; + bus_space_handle_t p; int error; if (type == SYS_RES_MEMORY) { Index: head/sys/arm/xscale/i8134x/obio.c =================================================================== --- head/sys/arm/xscale/i8134x/obio.c +++ head/sys/arm/xscale/i8134x/obio.c @@ -91,7 +91,7 @@ static struct resource * obio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *rv; struct rman *rm; Index: head/sys/arm/xscale/ixp425/avila_ata.c =================================================================== --- head/sys/arm/xscale/ixp425/avila_ata.c +++ head/sys/arm/xscale/ixp425/avila_ata.c @@ -282,7 +282,7 @@ static struct resource * ata_avila_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ata_avila_softc *sc = device_get_softc(dev); Index: head/sys/arm/xscale/ixp425/ixp425.c =================================================================== --- head/sys/arm/xscale/ixp425/ixp425.c +++ head/sys/arm/xscale/ixp425/ixp425.c @@ -496,7 +496,7 @@ static struct resource * ixp425_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ixp425_softc *sc = device_get_softc(dev); const struct hwvtrans *vtrans; Index: head/sys/arm/xscale/ixp425/ixp425_pci.c =================================================================== --- head/sys/arm/xscale/ixp425/ixp425_pci.c +++ head/sys/arm/xscale/ixp425/ixp425_pci.c @@ -269,7 +269,7 @@ static struct resource * ixppcib_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ixppcib_softc *sc = device_get_softc(bus); struct rman *rmanp; Index: head/sys/arm/xscale/pxa/pxa_obio.c =================================================================== --- head/sys/arm/xscale/pxa/pxa_obio.c +++ head/sys/arm/xscale/pxa/pxa_obio.c @@ -50,14 +50,14 @@ static struct resource_list * pxa_get_resource_list(device_t, device_t); static struct resource * pxa_alloc_resource(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); + int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int pxa_release_resource(device_t, device_t, int, int, struct resource *); static int pxa_activate_resource(device_t, device_t, int, int, struct resource *); static struct resource * pxa_alloc_gpio_irq(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); + int *, rman_res_t, rman_res_t, rman_res_t, u_int); struct obio_device { const char *od_name; @@ -224,7 +224,7 @@ static struct resource * pxa_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct obio_softc *sc; struct obio_device *od; @@ -351,7 +351,7 @@ static struct resource * pxa_alloc_gpio_irq(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct obio_softc *sc; struct obio_device *od; Index: head/sys/arm/xscale/pxa/pxa_smi.c =================================================================== --- head/sys/arm/xscale/pxa/pxa_smi.c +++ head/sys/arm/xscale/pxa/pxa_smi.c @@ -70,7 +70,7 @@ static int pxa_smi_read_ivar(device_t, device_t, int, uintptr_t *); static struct resource * pxa_smi_alloc_resource(device_t, device_t, - int, int *, u_long, u_long, u_long, u_int); + int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int pxa_smi_release_resource(device_t, device_t, int, int, struct resource *); static int pxa_smi_activate_resource(device_t, device_t, @@ -176,7 +176,7 @@ static struct resource * pxa_smi_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct pxa_smi_softc *sc; struct smi_ivars *smid; Index: head/sys/arm64/arm64/gic_v3_fdt.c =================================================================== --- head/sys/arm64/arm64/gic_v3_fdt.c +++ head/sys/arm64/arm64/gic_v3_fdt.c @@ -54,7 +54,7 @@ static int gic_v3_fdt_attach(device_t); static struct resource *gic_v3_ofw_bus_alloc_res(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, u_int); static const struct ofw_bus_devinfo *gic_v3_ofw_get_devinfo(device_t, device_t); static device_method_t gic_v3_fdt_methods[] = { @@ -174,7 +174,7 @@ static struct resource * gic_v3_ofw_bus_alloc_res(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct gic_v3_ofw_devinfo *di; struct resource_list_entry *rle; Index: head/sys/arm64/arm64/nexus.c =================================================================== --- head/sys/arm64/arm64/nexus.c +++ head/sys/arm64/arm64/nexus.c @@ -99,13 +99,14 @@ static int nexus_print_child(device_t, device_t); static device_t nexus_add_child(device_t, u_int, const char *, int); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, u_int); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, enum intr_polarity pol); static struct resource_list *nexus_get_reslist(device_t, device_t); -static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long); +static int nexus_set_resource(device_t, device_t, int, int, + rman_res_t, rman_res_t); static int nexus_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -201,7 +202,7 @@ */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct nexus_device *ndev = DEVTONX(child); struct resource *rv; @@ -332,7 +333,7 @@ static int nexus_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { struct nexus_device *ndev = DEVTONX(child); struct resource_list *rl = &ndev->nx_resources; Index: head/sys/arm64/cavium/thunder_pcie.c =================================================================== --- head/sys/arm64/cavium/thunder_pcie.c +++ head/sys/arm64/cavium/thunder_pcie.c @@ -110,7 +110,7 @@ /* Forward prototypes */ static struct resource *thunder_pcie_alloc_resource(device_t, - device_t, int, int *, u_long, u_long, u_long, u_int); + device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int thunder_pcie_attach(device_t); static int thunder_pcie_identify_pcib(device_t); static int thunder_pcie_maxslots(device_t); @@ -431,7 +431,7 @@ static struct resource * thunder_pcie_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct thunder_pcie_softc *sc = device_get_softc(dev); struct rman *rm = NULL; @@ -519,7 +519,7 @@ thunder_pcie_identify_pcib(device_t dev) { struct thunder_pcie_softc *sc; - u_long start; + rman_res_t start; sc = device_get_softc(dev); start = bus_get_resource_start(dev, SYS_RES_MEMORY, 0); Index: head/sys/arm64/cavium/thunder_pcie_pem.c =================================================================== --- head/sys/arm64/cavium/thunder_pcie_pem.c +++ head/sys/arm64/cavium/thunder_pcie_pem.c @@ -126,7 +126,7 @@ }; static struct resource * thunder_pem_alloc_resource(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); + int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int thunder_pem_attach(device_t); static int thunder_pem_detach(device_t); static uint64_t thunder_pem_config_reg_read(struct thunder_pem_softc *, int); @@ -230,7 +230,7 @@ thunder_pem_identify(device_t dev) { struct thunder_pem_softc *sc; - u_long start; + rman_res_t start; sc = device_get_softc(dev); start = rman_get_start(sc->reg); @@ -426,7 +426,7 @@ static struct resource * thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct thunder_pem_softc *sc = device_get_softc(dev); struct rman *rm = NULL; Index: head/sys/dev/acpica/acpi.c =================================================================== --- head/sys/dev/acpica/acpi.c +++ head/sys/dev/acpica/acpi.c @@ -121,12 +121,12 @@ static void acpi_reserve_resources(device_t dev); static int acpi_sysres_alloc(device_t dev); static int acpi_set_resource(device_t dev, device_t child, int type, - int rid, u_long start, u_long count); + int rid, rman_res_t start, rman_res_t count); static struct resource *acpi_alloc_resource(device_t bus, device_t child, - int type, int *rid, u_long start, u_long end, - u_long count, u_int flags); + int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); static int acpi_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, u_long start, u_long end); + struct resource *r, rman_res_t start, rman_res_t end); static int acpi_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); static void acpi_delete_resource(device_t bus, device_t child, int type, @@ -1247,13 +1247,13 @@ static int acpi_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { struct acpi_softc *sc = device_get_softc(dev); struct acpi_device *ad = device_get_ivars(child); struct resource_list *rl = &ad->ad_rl; ACPI_DEVICE_INFO *devinfo; - u_long end; + rman_res_t end; /* Ignore IRQ resources for PCI link devices. */ if (type == SYS_RES_IRQ && ACPI_ID_PROBE(dev, child, pcilink_ids) != NULL) @@ -1323,7 +1323,7 @@ static struct resource * acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { ACPI_RESOURCE ares; struct acpi_device *ad; @@ -1399,8 +1399,8 @@ * system resources. */ struct resource * -acpi_alloc_sysres(device_t child, int type, int *rid, u_long start, u_long end, - u_long count, u_int flags) +acpi_alloc_sysres(device_t child, int type, int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags) { struct rman *rm; struct resource *res; @@ -1450,7 +1450,7 @@ static int acpi_adjust_resource(device_t bus, device_t child, int type, struct resource *r, - u_long start, u_long end) + rman_res_t start, rman_res_t end) { if (acpi_is_resource_managed(type, r)) Index: head/sys/dev/acpica/acpi_hpet.c =================================================================== --- head/sys/dev/acpica/acpi_hpet.c +++ head/sys/dev/acpica/acpi_hpet.c @@ -322,7 +322,7 @@ static int hpet_find_irq_rid(device_t dev, u_long start, u_long end) { - u_long irq; + rman_res_t irq; int error, rid; for (rid = 0;; rid++) { Index: head/sys/dev/acpica/acpi_pcib_acpi.c =================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c +++ head/sys/dev/acpica/acpi_pcib_acpi.c @@ -91,12 +91,12 @@ int *irq); static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); #ifdef NEW_PCIB static int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, int type, struct resource *r, - u_long start, u_long end); + rman_res_t start, rman_res_t end); #ifdef PCI_RES_BUS static int acpi_pcib_acpi_release_resource(device_t dev, device_t child, int type, int rid, @@ -283,7 +283,7 @@ #if defined(NEW_PCIB) && defined(PCI_RES_BUS) static int -first_decoded_bus(struct acpi_hpcib_softc *sc, u_long *startp) +first_decoded_bus(struct acpi_hpcib_softc *sc, rman_res_t *startp) { struct resource_list_entry *rle; @@ -304,7 +304,7 @@ u_int slot, func, busok; #if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct resource *bus_res; - u_long start; + rman_res_t start; int rid; #endif uint8_t busno; @@ -584,7 +584,7 @@ struct resource * acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { #ifdef NEW_PCIB struct acpi_hpcib_softc *sc; @@ -625,7 +625,7 @@ #ifdef NEW_PCIB int acpi_pcib_acpi_adjust_resource(device_t dev, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct acpi_hpcib_softc *sc; Index: head/sys/dev/acpica/acpi_resource.c =================================================================== --- head/sys/dev/acpica/acpi_resource.c +++ head/sys/dev/acpica/acpi_resource.c @@ -671,7 +671,7 @@ struct resource_list_entry *bus_rle, *dev_rle; struct resource_list *bus_rl, *dev_rl; int done, type; - u_long start, end, count; + rman_res_t start, end, count; /* * Loop through all current resources to see if the new one overlaps Index: head/sys/dev/acpica/acpi_timer.c =================================================================== --- head/sys/dev/acpica/acpi_timer.c +++ head/sys/dev/acpica/acpi_timer.c @@ -122,7 +122,7 @@ acpi_timer_identify(driver_t *driver, device_t parent) { device_t dev; - u_long rlen, rstart; + rman_res_t rlen, rstart; int rid, rtype; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); Index: head/sys/dev/acpica/acpivar.h =================================================================== --- head/sys/dev/acpica/acpivar.h +++ head/sys/dev/acpica/acpivar.h @@ -383,7 +383,8 @@ ACPI_STATUS acpi_parse_resources(device_t dev, ACPI_HANDLE handle, struct acpi_parse_resource_set *set, void *arg); struct resource *acpi_alloc_sysres(device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags); + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags); /* ACPI event handling */ UINT32 acpi_event_power_button_sleep(void *context); Index: head/sys/dev/advansys/adv_isa.c =================================================================== --- head/sys/dev/advansys/adv_isa.c +++ head/sys/dev/advansys/adv_isa.c @@ -109,7 +109,7 @@ { int port_index; int max_port_index; - u_long iobase, iocount, irq; + rman_res_t iobase, iocount, irq; int user_iobase = 0; int rid = 0; void *ih; Index: head/sys/dev/ahci/ahci.h =================================================================== --- head/sys/dev/ahci/ahci.h +++ head/sys/dev/ahci/ahci.h @@ -626,7 +626,7 @@ int ahci_setup_interrupt(device_t dev); int ahci_print_child(device_t dev, device_t child); struct resource *ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags); + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int ahci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int ahci_setup_intr(device_t dev, device_t child, struct resource *irq, Index: head/sys/dev/ahci/ahci.c =================================================================== --- head/sys/dev/ahci/ahci.c +++ head/sys/dev/ahci/ahci.c @@ -523,7 +523,7 @@ struct resource * ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ahci_controller *ctlr = device_get_softc(dev); struct resource *res; Index: head/sys/dev/ata/ata-cbus.c =================================================================== --- head/sys/dev/ata/ata-cbus.c +++ head/sys/dev/ata/ata-cbus.c @@ -67,7 +67,7 @@ { struct resource *io; int rid; - u_long tmp; + rman_res_t tmp; /* dont probe PnP devices */ if (isa_get_vendorid(dev)) @@ -168,7 +168,8 @@ static struct resource * ata_cbus_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct ata_cbus_controller *ctlr = device_get_softc(dev); Index: head/sys/dev/ata/ata-isa.c =================================================================== --- head/sys/dev/ata/ata-isa.c +++ head/sys/dev/ata/ata-isa.c @@ -60,7 +60,7 @@ ata_isa_probe(device_t dev) { struct resource *io = NULL, *ctlio = NULL; - u_long tmp; + rman_res_t tmp; int rid; /* check isapnp ids */ @@ -100,7 +100,7 @@ { struct ata_channel *ch = device_get_softc(dev); struct resource *io = NULL, *ctlio = NULL; - u_long tmp; + rman_res_t tmp; int i, rid; if (ch->attached) Index: head/sys/dev/ata/ata-pci.h =================================================================== --- head/sys/dev/ata/ata-pci.h +++ head/sys/dev/ata/ata-pci.h @@ -535,7 +535,7 @@ int ata_pci_print_child(device_t dev, device_t child); int ata_pci_child_location_str(device_t dev, device_t child, char *buf, size_t buflen); -struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); +struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep); int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); Index: head/sys/dev/ata/ata-pci.c =================================================================== --- head/sys/dev/ata/ata-pci.c +++ head/sys/dev/ata/ata-pci.c @@ -217,7 +217,8 @@ struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct ata_pci_controller *controller = device_get_softc(dev); struct resource *res = NULL; Index: head/sys/dev/atkbdc/atkbdc_ebus.c =================================================================== --- head/sys/dev/atkbdc/atkbdc_ebus.c +++ head/sys/dev/atkbdc/atkbdc_ebus.c @@ -91,7 +91,7 @@ atkbdc_ebus_probe(device_t dev) { struct resource *port0, *port1; - u_long count, start; + rman_res_t count, start; int error, rid; if (strcmp(ofw_bus_get_name(dev), "8042") != 0) @@ -176,7 +176,7 @@ atkbdc_device_t *adi; device_t cdev; phandle_t child; - u_long count, intr, start; + rman_res_t count, intr, start; int children, error, rid, unit; char *cname, *dname; Index: head/sys/dev/atkbdc/atkbdc_isa.c =================================================================== --- head/sys/dev/atkbdc/atkbdc_isa.c +++ head/sys/dev/atkbdc/atkbdc_isa.c @@ -50,8 +50,8 @@ static device_t atkbdc_isa_add_child(device_t bus, u_int order, const char *name, int unit); static struct resource *atkbdc_isa_alloc_resource(device_t dev, device_t child, - int type, int *rid, u_long start, u_long end, - u_long count, u_int flags); + int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); static int atkbdc_isa_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); @@ -97,8 +97,8 @@ { struct resource *port0; struct resource *port1; - u_long start; - u_long count; + rman_res_t start; + rman_res_t count; int error; int rid; #if defined(__i386__) || defined(__amd64__) @@ -295,7 +295,7 @@ struct resource * atkbdc_isa_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { atkbdc_softc_t *sc; Index: head/sys/dev/atkbdc/atkbdc_subr.c =================================================================== --- head/sys/dev/atkbdc/atkbdc_subr.c +++ head/sys/dev/atkbdc/atkbdc_subr.c @@ -51,7 +51,7 @@ atkbdc_print_child(device_t bus, device_t dev) { atkbdc_device_t *kbdcdev; - u_long irq; + rman_res_t irq; int flags; int retval = 0; Index: head/sys/dev/cs/if_cs.c =================================================================== --- head/sys/dev/cs/if_cs.c +++ head/sys/dev/cs/if_cs.c @@ -258,7 +258,7 @@ { int i; int error; - u_long irq, junk; + rman_res_t irq, junk; struct cs_softc *sc = device_get_softc(dev); unsigned rev_type = 0; uint16_t id; Index: head/sys/dev/ctau/if_ct.c =================================================================== --- head/sys/dev/ctau/if_ct.c +++ head/sys/dev/ctau/if_ct.c @@ -317,8 +317,8 @@ static char dmatab [] = { 7, 6, 5, 0 }; static char irqtab [] = { 5, 10, 11, 7, 3, 15, 12, 0 }; -static int ct_is_free_res (device_t dev, int rid, int type, u_long start, - u_long end, u_long count) +static int ct_is_free_res (device_t dev, int rid, int type, rman_res_t start, + rman_res_t end, rman_res_t count) { struct resource *res; @@ -332,7 +332,7 @@ static void ct_identify (driver_t *driver, device_t dev) { - u_long iobase, rescount; + rman_res_t iobase, rescount; int devcount; device_t *devices; device_t child; @@ -440,7 +440,7 @@ static int ct_probe (device_t dev) { int unit = device_get_unit (dev); - u_long iobase, rescount; + rman_res_t iobase, rescount; if (!device_get_desc (dev) || strcmp (device_get_desc (dev), "Cronyx Tau-ISA")) @@ -529,7 +529,7 @@ static int ct_attach (device_t dev) { bdrv_t *bd = device_get_softc (dev); - u_long iobase, drq, irq, rescount; + rman_res_t iobase, drq, irq, rescount; int unit = device_get_unit (dev); char *ct_ln = CT_LOCK_NAME; ct_board_t *b; Index: head/sys/dev/cx/if_cx.c =================================================================== --- head/sys/dev/cx/if_cx.c +++ head/sys/dev/cx/if_cx.c @@ -405,8 +405,8 @@ static char dmatab [] = { 7, 6, 5, 0 }; static char irqtab [] = { 5, 10, 11, 7, 3, 15, 12, 0 }; -static int cx_is_free_res (device_t dev, int rid, int type, u_long start, - u_long end, u_long count) +static int cx_is_free_res (device_t dev, int rid, int type, rman_res_t start, + rman_res_t end, rman_res_t count) { struct resource *res; @@ -420,7 +420,7 @@ static void cx_identify (driver_t *driver, device_t dev) { - u_long iobase, rescount; + rman_res_t iobase, rescount; int devcount; device_t *devices; device_t child; @@ -530,7 +530,7 @@ { int unit = device_get_unit (dev); int i; - u_long iobase, rescount; + rman_res_t iobase, rescount; if (!device_get_desc (dev) || strcmp (device_get_desc (dev), "Cronyx Sigma")) @@ -629,7 +629,7 @@ static int cx_attach (device_t dev) { bdrv_t *bd = device_get_softc (dev); - u_long iobase, drq, irq, rescount; + rman_res_t iobase, drq, irq, rescount; int unit = device_get_unit (dev); char *cx_ln = CX_LOCK_NAME; cx_board_t *b; Index: head/sys/dev/ed/if_ed_3c503.c =================================================================== --- head/sys/dev/ed/if_ed_3c503.c +++ head/sys/dev/ed/if_ed_3c503.c @@ -74,7 +74,7 @@ int i; u_int memsize; u_char isa16bit; - u_long conf_maddr, conf_msize, irq, junk, pmem; + rman_res_t conf_maddr, conf_msize, irq, junk, pmem; error = ed_alloc_port(dev, 0, ED_3COM_IO_PORTS); if (error) Index: head/sys/dev/ed/if_ed_cbus.c =================================================================== --- head/sys/dev/ed/if_ed_cbus.c +++ head/sys/dev/ed/if_ed_cbus.c @@ -607,7 +607,7 @@ { struct ed_softc *sc = device_get_softc(dev); int error; - u_long conf_maddr, conf_msize; + rman_res_t conf_maddr, conf_msize; error = bus_get_resource(dev, SYS_RES_MEMORY, 0, &conf_maddr, &conf_msize); @@ -1001,7 +1001,7 @@ struct ed_softc *sc = device_get_softc(dev); int error; u_char tmp; - u_long conf_irq, junk; + rman_res_t conf_irq, junk; #ifdef DIAGNOSTIC u_char tmp_s; #endif @@ -1157,7 +1157,7 @@ int error; int i; u_char romdata[ETHER_ADDR_LEN * 2], tmp; - u_long conf_irq, junk; + rman_res_t conf_irq, junk; error = ed98_alloc_port(dev, port_rid); if (error) @@ -1251,7 +1251,7 @@ struct ed_softc *sc = device_get_softc(dev); int error; u_char tmp; - u_long conf_irq, junk; + rman_res_t conf_irq, junk; error = ed98_probe_Novell(dev, port_rid, flags); if (error) @@ -1303,7 +1303,7 @@ struct ed_softc *sc = device_get_softc(dev); int error; u_char tmp; - u_long conf_irq, junk; + rman_res_t conf_irq, junk; error = ed98_probe_Novell(dev, port_rid, flags); if (error) @@ -1427,7 +1427,7 @@ struct ed_softc *sc = device_get_softc(dev); int error; u_char tmp; - u_long conf_irq, junk; + rman_res_t conf_irq, junk; error = ed98_alloc_port(dev, port_rid); if (error) Index: head/sys/dev/ed/if_ed_hpp.c =================================================================== --- head/sys/dev/ed/if_ed_hpp.c +++ head/sys/dev/ed/if_ed_hpp.c @@ -126,7 +126,7 @@ u_char irq; /* board configured IRQ */ uint8_t test_pattern[ED_HPP_TEST_SIZE]; /* read/write areas for */ uint8_t test_buffer[ED_HPP_TEST_SIZE]; /* probing card */ - u_long conf_maddr, conf_msize, conf_irq, junk; + rman_res_t conf_maddr, conf_msize, conf_irq, junk; error = ed_alloc_port(dev, 0, ED_HPP_IO_PORTS); if (error) Index: head/sys/dev/ed/if_ed_wd80x3.c =================================================================== --- head/sys/dev/ed/if_ed_wd80x3.c +++ head/sys/dev/ed/if_ed_wd80x3.c @@ -97,7 +97,7 @@ int i; u_int memsize; u_char iptr, isa16bit, sum, totalsum; - u_long irq, junk, pmem; + rman_res_t irq, junk, pmem; sc->chip_type = ED_CHIP_TYPE_DP8390; Index: head/sys/dev/eisa/eisaconf.c =================================================================== --- head/sys/dev/eisa/eisaconf.c +++ head/sys/dev/eisa/eisaconf.c @@ -352,7 +352,7 @@ static struct resource * eisa_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { int isdefault; struct eisa_device *e_dev = device_get_ivars(child); Index: head/sys/dev/fdt/simplebus.c =================================================================== --- head/sys/dev/fdt/simplebus.c +++ head/sys/dev/fdt/simplebus.c @@ -46,7 +46,7 @@ static int simplebus_probe(device_t dev); static int simplebus_attach(device_t dev); static struct resource *simplebus_alloc_resource(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); + int *, rman_res_t, rman_res_t, rman_res_t, u_int); static void simplebus_probe_nomatch(device_t bus, device_t child); static int simplebus_print_child(device_t bus, device_t child); static device_t simplebus_add_child(device_t dev, u_int order, @@ -322,7 +322,7 @@ static struct resource * simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct simplebus_softc *sc; struct simplebus_devinfo *di; Index: head/sys/dev/fe/if_fe_cbus.c =================================================================== --- head/sys/dev/fe/if_fe_cbus.c +++ head/sys/dev/fe/if_fe_cbus.c @@ -298,7 +298,7 @@ { struct fe_softc *sc = device_get_softc(dev); int i, n; - u_long iobase, irq; + rman_res_t iobase, irq; u_char sum; static struct fe_simple_probe_struct probe_table [] = { @@ -398,7 +398,7 @@ { struct fe_softc *sc = device_get_softc(dev); int i, n, xirq, error; - u_long iobase, irq; + rman_res_t iobase, irq; u_char eeprom [JLI_EEPROM_SIZE]; u_short const * irqmap; @@ -524,7 +524,7 @@ fe_probe_cnet9ne (device_t dev) { struct fe_softc *sc = device_get_softc(dev); - u_long iobase, irq; + rman_res_t iobase, irq; static struct fe_simple_probe_struct probe_table [] = { { FE_DLCR2, 0x58, 0x00 }, @@ -598,7 +598,7 @@ fe_probe_ssi(device_t dev) { struct fe_softc *sc = device_get_softc(dev); - u_long iobase, irq; + rman_res_t iobase, irq; u_char eeprom [SSI_EEPROM_SIZE]; static struct fe_simple_probe_struct probe_table [] = { @@ -676,7 +676,7 @@ { struct fe_softc *sc = device_get_softc(dev); - u_long iobase, irq; + rman_res_t iobase, irq; u_char eeprom [LNX_EEPROM_SIZE]; static struct fe_simple_probe_struct probe_table [] = { @@ -804,7 +804,7 @@ struct fe_softc *sc = device_get_softc(dev); u_char sum, save7; - u_long iobase, irq; + rman_res_t iobase, irq; int i; static struct fe_simple_probe_struct const probe_table [] = { { FE_DLCR2, 0x58, 0x00 }, @@ -949,7 +949,7 @@ struct fe_softc *sc = device_get_softc(dev); int i; - u_long iobase, irq; + rman_res_t iobase, irq; u_char eeprom [REX_EEPROM_SIZE]; static struct fe_simple_probe_struct probe_table [] = { Index: head/sys/dev/fe/if_fe_isa.c =================================================================== --- head/sys/dev/fe/if_fe_isa.c +++ head/sys/dev/fe/if_fe_isa.c @@ -203,7 +203,7 @@ { struct fe_softc *sc = device_get_softc(dev); int n; - u_long iobase, irq; + rman_res_t iobase, irq; static u_short const irqmap [ 4 ] = { 3, 7, 10, 15 }; @@ -698,7 +698,7 @@ { struct fe_softc *sc = device_get_softc(dev); int i, n, error, xirq; - u_long iobase, irq; + rman_res_t iobase, irq; u_char eeprom [JLI_EEPROM_SIZE]; u_short const * irqmap; @@ -816,7 +816,7 @@ fe_probe_ssi(device_t dev) { struct fe_softc *sc = device_get_softc(dev); - u_long iobase, irq; + rman_res_t iobase, irq; u_char eeprom [SSI_EEPROM_SIZE]; static struct fe_simple_probe_struct probe_table [] = { @@ -878,7 +878,7 @@ fe_probe_lnx(device_t dev) { struct fe_softc *sc = device_get_softc(dev); - u_long iobase, irq; + rman_res_t iobase, irq; u_char eeprom [LNX_EEPROM_SIZE]; static struct fe_simple_probe_struct probe_table [] = { @@ -946,7 +946,7 @@ fe_probe_gwy(device_t dev) { struct fe_softc *sc = device_get_softc(dev); - u_long iobase, irq; + rman_res_t iobase, irq; static struct fe_simple_probe_struct probe_table [] = { /* { FE_DLCR2, 0x70, 0x00 }, */ @@ -999,7 +999,7 @@ fe_probe_ubn(device_t dev) { struct fe_softc *sc = device_get_softc(dev); - u_long iobase, irq; + rman_res_t iobase, irq; #if 0 u_char sum; #endif Index: head/sys/dev/gpio/gpiobus.c =================================================================== --- head/sys/dev/gpio/gpiobus.c +++ head/sys/dev/gpio/gpiobus.c @@ -488,7 +488,7 @@ static int gpiobus_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { struct gpiobus_ivar *devi; struct resource_list_entry *rle; @@ -506,7 +506,7 @@ static struct resource * gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct gpiobus_softc *sc; struct resource *rv; Index: head/sys/dev/mca/mca_bus.c =================================================================== --- head/sys/dev/mca/mca_bus.c +++ head/sys/dev/mca/mca_bus.c @@ -456,7 +456,7 @@ static struct resource * mca_alloc_resource (device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mca_device * m_dev = device_get_ivars(child); struct resource_list_entry * rle; Index: head/sys/dev/mvs/mvs_pci.c =================================================================== --- head/sys/dev/mvs/mvs_pci.c +++ head/sys/dev/mvs/mvs_pci.c @@ -389,7 +389,8 @@ static struct resource * mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct mvs_controller *ctlr = device_get_softc(dev); int unit = ((struct mvs_channel *)device_get_softc(child))->unit; Index: head/sys/dev/mvs/mvs_soc.c =================================================================== --- head/sys/dev/mvs/mvs_soc.c +++ head/sys/dev/mvs/mvs_soc.c @@ -336,7 +336,7 @@ static struct resource * mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mvs_controller *ctlr = device_get_softc(dev); int unit = ((struct mvs_channel *)device_get_softc(child))->unit; Index: head/sys/dev/ncv/ncr53c500_pccard.c =================================================================== --- head/sys/dev/ncv/ncr53c500_pccard.c +++ head/sys/dev/ncv/ncr53c500_pccard.c @@ -142,7 +142,7 @@ { struct ncv_softc *sc = device_get_softc(dev); u_int32_t flags = device_get_flags(dev); - u_long ioaddr, iosize, maddr, msize; + rman_res_t ioaddr, iosize, maddr, msize; int error; bus_addr_t offset = 0; Index: head/sys/dev/nsp/nsp_pccard.c =================================================================== --- head/sys/dev/nsp/nsp_pccard.c +++ head/sys/dev/nsp/nsp_pccard.c @@ -115,7 +115,7 @@ nsp_alloc_resource(device_t dev) { struct nsp_softc *sc = device_get_softc(dev); - u_long ioaddr, iosize, maddr, msize; + rman_res_t ioaddr, iosize, maddr, msize; int error; error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &ioaddr, &iosize); Index: head/sys/dev/ofw/ofwbus.c =================================================================== --- head/sys/dev/ofw/ofwbus.c +++ head/sys/dev/ofw/ofwbus.c @@ -178,7 +178,7 @@ static struct resource * ofwbus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ofwbus_softc *sc; struct rman *rm; @@ -239,7 +239,7 @@ static int ofwbus_adjust_resource(device_t bus, device_t child __unused, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct ofwbus_softc *sc; struct rman *rm; Index: head/sys/dev/pccard/pccard.c =================================================================== --- head/sys/dev/pccard/pccard.c +++ head/sys/dev/pccard/pccard.c @@ -97,9 +97,9 @@ const char *name, int type, int count, const char *format); static int pccard_print_child(device_t dev, device_t child); static int pccard_set_resource(device_t dev, device_t child, int type, - int rid, u_long start, u_long count); + int rid, rman_res_t start, rman_res_t count); static int pccard_get_resource(device_t dev, device_t child, int type, - int rid, u_long *startp, u_long *countp); + int rid, rman_res_t *startp, rman_res_t *countp); static void pccard_delete_resource(device_t dev, device_t child, int type, int rid); static int pccard_set_res_flags(device_t dev, device_t child, int type, @@ -113,8 +113,8 @@ uintptr_t *result); static void pccard_driver_added(device_t dev, driver_t *driver); static struct resource *pccard_alloc_resource(device_t dev, - device_t child, int type, int *rid, u_long start, - u_long end, u_long count, u_int flags); + device_t child, int type, int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags); static int pccard_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); static void pccard_child_detached(device_t parent, device_t dev); @@ -474,7 +474,7 @@ struct pccard_ce_iospace *ios; struct pccard_ce_memspace *mems; device_t bus; - u_long start, end, len; + rman_res_t start, end, len; int i, rid, spaces; if (pf->pf_flags & PFF_ENABLED) { @@ -614,8 +614,8 @@ } static void -pccard_mfc_adjust_iobase(struct pccard_function *pf, bus_addr_t addr, - bus_addr_t offset, bus_size_t size) +pccard_mfc_adjust_iobase(struct pccard_function *pf, rman_res_t addr, + rman_res_t offset, rman_res_t size) { bus_size_t iosize, tmp; @@ -923,7 +923,7 @@ static int pccard_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { struct pccard_ivar *devi = PCCARD_IVAR(child); struct resource_list *rl = &devi->resources; @@ -952,7 +952,7 @@ static int pccard_get_resource(device_t dev, device_t child, int type, int rid, - u_long *startp, u_long *countp) + rman_res_t *startp, rman_res_t *countp) { struct pccard_ivar *devi = PCCARD_IVAR(child); struct resource_list *rl = &devi->resources; @@ -1132,7 +1132,7 @@ static struct resource * pccard_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct pccard_ivar *dinfo; struct resource_list_entry *rle = 0; Index: head/sys/dev/pccard/pccardvarp.h =================================================================== --- head/sys/dev/pccard/pccardvarp.h +++ head/sys/dev/pccard/pccardvarp.h @@ -48,14 +48,14 @@ #define PCCARD_CFE_AUDIO 0x0800 struct pccard_ce_iospace { - u_long length; - u_long start; + rman_res_t length; + rman_res_t start; }; struct pccard_ce_memspace { - u_long length; - u_long cardaddr; - u_long hostaddr; + rman_res_t length; + rman_res_t cardaddr; + rman_res_t hostaddr; }; struct pccard_config_entry { Index: head/sys/dev/pccbb/pccbb.c =================================================================== --- head/sys/dev/pccbb/pccbb.c +++ head/sys/dev/pccbb/pccbb.c @@ -166,8 +166,8 @@ static int cbb_cardbus_deactivate_resource(device_t brdev, device_t child, int type, int rid, struct resource *res); static struct resource *cbb_cardbus_alloc_resource(device_t brdev, - device_t child, int type, int *rid, u_long start, - u_long end, u_long count, u_int flags); + device_t child, int type, int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags); static int cbb_cardbus_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *res); static int cbb_cardbus_power_enable_socket(device_t brdev, @@ -1230,12 +1230,12 @@ static struct resource * cbb_cardbus_alloc_resource(device_t brdev, device_t child, int type, - int *rid, u_long start, u_long end, u_long count, u_int flags) + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct cbb_softc *sc = device_get_softc(brdev); int tmp; struct resource *res; - u_long align; + rman_res_t align; switch (type) { case SYS_RES_IRQ: @@ -1395,7 +1395,7 @@ static struct resource * cbb_pcic_alloc_resource(device_t brdev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res = NULL; struct cbb_softc *sc = device_get_softc(brdev); @@ -1538,7 +1538,7 @@ struct resource * cbb_alloc_resource(device_t brdev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct cbb_softc *sc = device_get_softc(brdev); Index: head/sys/dev/pccbb/pccbb_pci.c =================================================================== --- head/sys/dev/pccbb/pccbb_pci.c +++ head/sys/dev/pccbb/pccbb_pci.c @@ -783,7 +783,7 @@ #if defined(NEW_PCIB) && defined(PCI_RES_BUS) static struct resource * cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct cbb_softc *sc; @@ -797,7 +797,7 @@ static int cbb_pci_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct cbb_softc *sc; Index: head/sys/dev/pccbb/pccbbvar.h =================================================================== --- head/sys/dev/pccbb/pccbbvar.h +++ head/sys/dev/pccbb/pccbbvar.h @@ -113,7 +113,7 @@ int cbb_activate_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); struct resource *cbb_alloc_resource(device_t brdev, device_t child, - int type, int *rid, u_long start, u_long end, u_long count, + int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); void cbb_child_detached(device_t brdev, device_t child); int cbb_child_present(device_t parent, device_t child); Index: head/sys/dev/pcf/pcf_isa.c =================================================================== --- head/sys/dev/pcf/pcf_isa.c +++ head/sys/dev/pcf/pcf_isa.c @@ -100,7 +100,7 @@ static int pcf_isa_probe(device_t dev) { - u_long start, count; + rman_res_t start, count; u_int rid = 0, port, error; /* skip PnP probes */ Index: head/sys/dev/pci/hostb_pci.c =================================================================== --- head/sys/dev/pci/hostb_pci.c +++ head/sys/dev/pci/hostb_pci.c @@ -102,7 +102,7 @@ static struct resource * pci_hostb_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { return (bus_alloc_resource(dev, type, rid, start, end, count, flags)); Index: head/sys/dev/pci/isa_pci.c =================================================================== --- head/sys/dev/pci/isa_pci.c +++ head/sys/dev/pci/isa_pci.c @@ -52,8 +52,8 @@ static int isab_pci_probe(device_t dev); static int isab_pci_attach(device_t dev); static struct resource * isab_pci_alloc_resource(device_t dev, - device_t child, int type, int *rid, u_long start, u_long end, u_long count, - u_int flags); + device_t child, int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); static int isab_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); @@ -169,7 +169,7 @@ static struct resource * isab_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct isab_pci_softc *sc; int bar; Index: head/sys/dev/pci/pci.c =================================================================== --- head/sys/dev/pci/pci.c +++ head/sys/dev/pci/pci.c @@ -3353,7 +3353,7 @@ { struct resource *res; char *cp; - u_long start, end, count; + rman_res_t start, end, count; int rid, sec_bus, sec_reg, sub_bus, sub_reg, sup_bus; switch (cfg->hdrtype & PCIM_HDRTYPE) { @@ -3453,8 +3453,8 @@ } static struct resource * -pci_alloc_secbus(device_t dev, device_t child, int *rid, u_long start, - u_long end, u_long count, u_int flags) +pci_alloc_secbus(device_t dev, device_t child, int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags) { struct pci_devinfo *dinfo; pcicfgregs *cfg; @@ -4618,7 +4618,8 @@ static struct resource * pci_reserve_map(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int num, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int num, + u_int flags) { struct pci_devinfo *dinfo = device_get_ivars(child); struct resource_list *rl = &dinfo->resources; @@ -4716,7 +4717,8 @@ struct resource * pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_long num, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_long num, + u_int flags) { struct pci_devinfo *dinfo; struct resource_list *rl; @@ -4791,7 +4793,7 @@ struct resource * pci_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { #ifdef PCI_IOV struct pci_devinfo *dinfo; Index: head/sys/dev/pci/pci_host_generic.c =================================================================== --- head/sys/dev/pci/pci_host_generic.c +++ head/sys/dev/pci/pci_host_generic.c @@ -124,8 +124,8 @@ static int generic_pcie_write_ivar(device_t dev, device_t child, int index, uintptr_t value); static struct resource *generic_pcie_alloc_resource(device_t dev, - device_t child, int type, int *rid, u_long start, u_long end, - u_long count, u_int flags); + device_t child, int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); static int generic_pcie_release_resource(device_t dev, device_t child, int type, int rid, struct resource *res); @@ -482,7 +482,7 @@ static struct resource * generic_pcie_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct generic_pcie_softc *sc; struct resource *res; @@ -527,7 +527,7 @@ static int generic_pcie_adjust_resource(device_t dev, device_t child, int type, - struct resource *res, u_long start, u_long end) + struct resource *res, rman_res_t start, rman_res_t end) { struct generic_pcie_softc *sc; struct rman *rm; Index: head/sys/dev/pci/pci_iov.c =================================================================== --- head/sys/dev/pci/pci_iov.c +++ head/sys/dev/pci/pci_iov.c @@ -320,7 +320,7 @@ struct resource *res; struct pcicfg_iov *iov; device_t dev, bus; - u_long start, end; + rman_res_t start, end; pci_addr_t bar_size; int rid; @@ -890,15 +890,15 @@ } struct resource * -pci_vf_alloc_mem_resource(device_t dev, device_t child, int *rid, u_long start, - u_long end, u_long count, u_int flags) +pci_vf_alloc_mem_resource(device_t dev, device_t child, int *rid, + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct pci_devinfo *dinfo; struct pcicfg_iov *iov; struct pci_map *map; struct resource *res; struct resource_list_entry *rle; - u_long bar_start, bar_end; + rman_res_t bar_start, bar_end; pci_addr_t bar_length; int error; Index: head/sys/dev/pci/pci_pci.c =================================================================== --- head/sys/dev/pci/pci_pci.c +++ head/sys/dev/pci/pci_pci.c @@ -212,9 +212,10 @@ * ISA alias range. */ static int -pcib_is_isa_range(struct pcib_softc *sc, u_long start, u_long end, u_long count) +pcib_is_isa_range(struct pcib_softc *sc, rman_res_t start, rman_res_t end, + rman_res_t count) { - u_long next_alias; + rman_res_t next_alias; if (!(sc->bridgectl & PCIB_BCR_ISA_ENABLE)) return (0); @@ -275,13 +276,13 @@ } } -typedef void (nonisa_callback)(u_long start, u_long end, void *arg); +typedef void (nonisa_callback)(rman_res_t start, rman_res_t end, void *arg); static void -pcib_walk_nonisa_ranges(u_long start, u_long end, nonisa_callback *cb, +pcib_walk_nonisa_ranges(rman_res_t start, rman_res_t end, nonisa_callback *cb, void *arg) { - u_long next_end; + rman_res_t next_end; /* * If start is within an ISA alias range, move up to the start @@ -309,7 +310,7 @@ } static void -count_ranges(u_long start, u_long end, void *arg) +count_ranges(rman_res_t start, rman_res_t end, void *arg) { int *countp; @@ -324,7 +325,7 @@ }; static void -alloc_ranges(u_long start, u_long end, void *arg) +alloc_ranges(rman_res_t start, rman_res_t end, void *arg) { struct alloc_state *as; struct pcib_window *w; @@ -348,7 +349,7 @@ } static int -pcib_alloc_nonisa_ranges(struct pcib_softc *sc, u_long start, u_long end) +pcib_alloc_nonisa_ranges(struct pcib_softc *sc, rman_res_t start, rman_res_t end) { struct alloc_state as; int i, new_count; @@ -609,7 +610,7 @@ static struct resource * pcib_suballoc_bus(struct pcib_secbus *bus, device_t child, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; @@ -633,9 +634,9 @@ * subbus. */ static int -pcib_grow_subbus(struct pcib_secbus *bus, u_long new_end) +pcib_grow_subbus(struct pcib_secbus *bus, rman_res_t new_end) { - u_long old_end; + rman_res_t old_end; int error; old_end = rman_get_end(bus->res); @@ -658,10 +659,10 @@ struct resource * pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; - u_long start_free, end_free, new_end; + rman_res_t start_free, end_free, new_end; /* * First, see if the request can be satisified by the existing @@ -1158,8 +1159,8 @@ */ static struct resource * pcib_suballoc_resource(struct pcib_softc *sc, struct pcib_window *w, - device_t child, int type, int *rid, u_long start, u_long end, u_long count, - u_int flags) + device_t child, int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags) { struct resource *res; @@ -1196,10 +1197,10 @@ /* Allocate a fresh resource range for an unconfigured window. */ static int pcib_alloc_new_window(struct pcib_softc *sc, struct pcib_window *w, int type, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; - u_long base, limit, wmask; + rman_res_t base, limit, wmask; int rid; /* @@ -1269,7 +1270,7 @@ /* Try to expand an existing window to the requested base and limit. */ static int pcib_expand_window(struct pcib_softc *sc, struct pcib_window *w, int type, - u_long base, u_long limit) + rman_res_t base, rman_res_t limit) { struct resource *res; int error, i, force_64k_base; @@ -1367,9 +1368,9 @@ */ static int pcib_grow_window(struct pcib_softc *sc, struct pcib_window *w, int type, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { - u_long align, start_free, end_free, front, back, wmask; + rman_res_t align, start_free, end_free, front, back, wmask; int error; /* @@ -1534,7 +1535,7 @@ */ struct resource * pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct pcib_softc *sc; struct resource *r; @@ -1623,7 +1624,7 @@ int pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r, - u_long start, u_long end) + rman_res_t start, rman_res_t end) { struct pcib_softc *sc; @@ -1658,7 +1659,7 @@ */ struct resource * pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct pcib_softc *sc = device_get_softc(dev); const char *name, *suffix; Index: head/sys/dev/pci/pci_private.h =================================================================== --- head/sys/dev/pci/pci_private.h +++ head/sys/dev/pci/pci_private.h @@ -105,8 +105,8 @@ int pci_msix_pba_bar_method(device_t dev, device_t child); int pci_msix_table_bar_method(device_t dev, device_t child); struct resource *pci_alloc_resource(device_t dev, device_t child, - int type, int *rid, u_long start, u_long end, u_long count, - u_int flags); + int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); int pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int pci_activate_resource(device_t dev, device_t child, int type, @@ -151,8 +151,8 @@ pci_addr_t size); struct resource *pci_alloc_multi_resource(device_t dev, device_t child, - int type, int *rid, u_long start, u_long end, u_long count, - u_long num, u_int flags); + int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_long num, u_int flags); int pci_iov_attach_method(device_t bus, device_t dev, struct nvlist *pf_schema, struct nvlist *vf_schema); @@ -162,8 +162,8 @@ uint16_t rid, uint16_t vid, uint16_t did); struct resource *pci_vf_alloc_mem_resource(device_t dev, device_t child, - int *rid, u_long start, u_long end, u_long count, - u_int flags); + int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); int pci_vf_release_mem_resource(device_t dev, device_t child, int rid, struct resource *r); #endif /* _PCI_PRIVATE_H_ */ Index: head/sys/dev/pci/pci_subr.c =================================================================== --- head/sys/dev/pci/pci_subr.c +++ head/sys/dev/pci/pci_subr.c @@ -178,8 +178,8 @@ } int -pcib_host_res_decodes(struct pcib_host_resources *hr, int type, u_long start, - u_long end, u_int flags) +pcib_host_res_decodes(struct pcib_host_resources *hr, int type, rman_res_t start, + rman_res_t end, u_int flags) { struct resource_list_entry *rle; int rid; @@ -201,11 +201,11 @@ struct resource * pcib_host_res_alloc(struct pcib_host_resources *hr, device_t dev, int type, - int *rid, u_long start, u_long end, u_long count, u_int flags) + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list_entry *rle; struct resource *r; - u_long new_start, new_end; + rman_res_t new_start, new_end; if (flags & RF_PREFETCHABLE) KASSERT(type == SYS_RES_MEMORY, @@ -261,7 +261,7 @@ int pcib_host_res_adjust(struct pcib_host_resources *hr, device_t dev, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct resource_list_entry *rle; @@ -329,8 +329,8 @@ } struct resource * -pci_domain_alloc_bus(int domain, device_t dev, int *rid, u_long start, - u_long end, u_long count, u_int flags) +pci_domain_alloc_bus(int domain, device_t dev, int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags) { struct pci_domain *d; struct resource *res; @@ -349,7 +349,7 @@ int pci_domain_adjust_bus(int domain, device_t dev, struct resource *r, - u_long start, u_long end) + rman_res_t start, rman_res_t end) { #ifdef INVARIANTS struct pci_domain *d; Index: head/sys/dev/pci/pcib_private.h =================================================================== --- head/sys/dev/pci/pcib_private.h +++ head/sys/dev/pci/pcib_private.h @@ -49,13 +49,13 @@ int pcib_host_res_free(device_t pcib, struct pcib_host_resources *hr); int pcib_host_res_decodes(struct pcib_host_resources *hr, int type, - u_long start, u_long end, u_int flags); + rman_res_t start, rman_res_t end, u_int flags); struct resource *pcib_host_res_alloc(struct pcib_host_resources *hr, - device_t dev, int type, int *rid, u_long start, u_long end, - u_long count, u_int flags); + device_t dev, int type, int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags); int pcib_host_res_adjust(struct pcib_host_resources *hr, - device_t dev, int type, struct resource *r, u_long start, - u_long end); + device_t dev, int type, struct resource *r, rman_res_t start, + rman_res_t end); #endif /* @@ -132,13 +132,13 @@ int slot, int func, uint8_t *busnum); #if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct resource *pci_domain_alloc_bus(int domain, device_t dev, int *rid, - u_long start, u_long end, u_long count, u_int flags); + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int pci_domain_adjust_bus(int domain, device_t dev, - struct resource *r, u_long start, u_long end); + struct resource *r, rman_res_t start, rman_res_t end); int pci_domain_release_bus(int domain, device_t dev, int rid, struct resource *r); struct resource *pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, - int *rid, u_long start, u_long end, u_long count, + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); void pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count); @@ -152,10 +152,11 @@ int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); int pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); struct resource *pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags); + rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); #ifdef NEW_PCIB int pcib_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, u_long start, u_long end); + struct resource *r, rman_res_t start, rman_res_t end); int pcib_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); #endif Index: head/sys/dev/pci/pcivar.h =================================================================== --- head/sys/dev/pci/pcivar.h +++ head/sys/dev/pci/pcivar.h @@ -397,7 +397,7 @@ * Check if the address range falls within the VGA defined address range(s) */ static __inline int -pci_is_vga_ioport_range(u_long start, u_long end) +pci_is_vga_ioport_range(rman_res_t start, rman_res_t end) { return (((start >= 0x3b0 && end <= 0x3bb) || @@ -405,7 +405,7 @@ } static __inline int -pci_is_vga_memory_range(u_long start, u_long end) +pci_is_vga_memory_range(rman_res_t start, rman_res_t end) { return ((start >= 0xa0000 && end <= 0xbffff) ? 1 : 0); Index: head/sys/dev/pci/vga_pci.c =================================================================== --- head/sys/dev/pci/vga_pci.c +++ head/sys/dev/pci/vga_pci.c @@ -68,7 +68,8 @@ static struct vga_resource *lookup_res(struct vga_pci_softc *sc, int rid); static struct resource *vga_pci_alloc_resource(device_t dev, device_t child, - int type, int *rid, u_long start, u_long end, u_long count, u_int flags); + int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags); static int vga_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); @@ -333,7 +334,7 @@ static struct resource * vga_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct vga_resource *vr; Index: head/sys/dev/ppc/ppc.c =================================================================== --- head/sys/dev/ppc/ppc.c +++ head/sys/dev/ppc/ppc.c @@ -1674,7 +1674,7 @@ #endif struct ppc_data *ppc; int error; - u_long port; + rman_res_t port; /* * Allocate the ppc_data structure. @@ -2015,7 +2015,7 @@ */ struct resource * ppc_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ppc_data *ppc = DEVTOSOFTC(bus); Index: head/sys/dev/ppc/ppcvar.h =================================================================== --- head/sys/dev/ppc/ppcvar.h +++ head/sys/dev/ppc/ppcvar.h @@ -41,7 +41,7 @@ int ppc_exec_microseq(device_t, struct ppb_microseq **); struct resource *ppc_alloc_resource(device_t bus, device_t child, int type, - int *rid, u_long start, u_long end, u_long count, u_int flags); + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int ppc_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); int ppc_reset_epp(device_t); Index: head/sys/dev/puc/puc.c =================================================================== --- head/sys/dev/puc/puc.c +++ head/sys/dev/puc/puc.c @@ -78,7 +78,7 @@ { struct puc_bar *bar; struct rman *rm; - u_long end, start; + rman_res_t end, start; int error, i; /* Find the BAR entry with the given RID. */ @@ -474,7 +474,7 @@ struct resource * puc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct puc_port *port; struct resource *res; @@ -567,11 +567,11 @@ int puc_bus_get_resource(device_t dev, device_t child, int type, int rid, - u_long *startp, u_long *countp) + rman_res_t *startp, rman_res_t *countp) { struct puc_port *port; struct resource *res; - u_long start; + rman_res_t start; /* Get our immediate child. */ while (child != NULL && device_get_parent(child) != dev) Index: head/sys/dev/puc/puc_bfe.h =================================================================== --- head/sys/dev/puc/puc_bfe.h +++ head/sys/dev/puc/puc_bfe.h @@ -85,9 +85,9 @@ int puc_bus_child_location_str(device_t, device_t, char *, size_t); int puc_bus_child_pnpinfo_str(device_t, device_t, char *, size_t); -struct resource *puc_bus_alloc_resource(device_t, device_t, int, int *, u_long, - u_long, u_long, u_int); -int puc_bus_get_resource(device_t, device_t, int, int, u_long *, u_long *); +struct resource *puc_bus_alloc_resource(device_t, device_t, int, int *, + rman_res_t, rman_res_t, rman_res_t, u_int); +int puc_bus_get_resource(device_t, device_t, int, int, rman_res_t *, rman_res_t *); int puc_bus_print_child(device_t, device_t); int puc_bus_read_ivar(device_t, device_t, int, uintptr_t *); int puc_bus_release_resource(device_t, device_t, int, int, struct resource *); Index: head/sys/dev/quicc/quicc_bfe.h =================================================================== --- head/sys/dev/quicc/quicc_bfe.h +++ head/sys/dev/quicc/quicc_bfe.h @@ -61,8 +61,9 @@ int quicc_bfe_probe(device_t, u_int); struct resource *quicc_bus_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); -int quicc_bus_get_resource(device_t, device_t, int, int, u_long *, u_long *); + rman_res_t, rman_res_t, rman_res_t, u_int); +int quicc_bus_get_resource(device_t, device_t, int, int, + rman_res_t *, rman_res_t *); int quicc_bus_read_ivar(device_t, device_t, int, uintptr_t *); int quicc_bus_release_resource(device_t, device_t, int, int, struct resource *); int quicc_bus_setup_intr(device_t, device_t, struct resource *, int, Index: head/sys/dev/quicc/quicc_core.c =================================================================== --- head/sys/dev/quicc/quicc_core.c +++ head/sys/dev/quicc/quicc_core.c @@ -101,7 +101,7 @@ struct quicc_softc *sc; struct resource_list_entry *rle; const char *sep; - u_long size, start; + rman_res_t size, start; int error; sc = device_get_softc(dev); @@ -254,7 +254,7 @@ struct resource * quicc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct quicc_device *qd; struct resource_list_entry *rle; @@ -284,7 +284,7 @@ int quicc_bus_get_resource(device_t dev, device_t child, int type, int rid, - u_long *startp, u_long *countp) + rman_res_t *startp, rman_res_t *countp) { struct quicc_device *qd; struct resource_list_entry *rle; Index: head/sys/dev/scc/scc_bfe.h =================================================================== --- head/sys/dev/scc/scc_bfe.h +++ head/sys/dev/scc/scc_bfe.h @@ -143,8 +143,8 @@ int scc_bfe_probe(device_t dev, u_int regshft, u_int rclk, u_int rid); struct resource *scc_bus_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); -int scc_bus_get_resource(device_t, device_t, int, int, u_long *, u_long *); + rman_res_t, rman_res_t, rman_res_t, u_int); +int scc_bus_get_resource(device_t, device_t, int, int, rman_res_t *, rman_res_t *); int scc_bus_read_ivar(device_t, device_t, int, uintptr_t *); int scc_bus_release_resource(device_t, device_t, int, int, struct resource *); int scc_bus_setup_intr(device_t, device_t, struct resource *, int, Index: head/sys/dev/scc/scc_core.c =================================================================== --- head/sys/dev/scc/scc_core.c +++ head/sys/dev/scc/scc_core.c @@ -103,7 +103,7 @@ struct scc_softc *sc, *sc0; const char *sep; bus_space_handle_t bh; - u_long base, size, start, sz; + rman_res_t base, size, start, sz; int c, error, mode, sysdev; /* @@ -407,7 +407,7 @@ struct resource * scc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list_entry *rle; struct scc_chan *ch; @@ -431,7 +431,7 @@ int scc_bus_get_resource(device_t dev, device_t child, int type, int rid, - u_long *startp, u_long *countp) + rman_res_t *startp, rman_res_t *countp) { struct resource_list_entry *rle; struct scc_chan *ch; Index: head/sys/dev/siba/siba.c =================================================================== --- head/sys/dev/siba/siba.c +++ head/sys/dev/siba/siba.c @@ -92,8 +92,8 @@ struct resource *); static device_t siba_add_child(device_t, u_int, const char *, int); static struct resource * - siba_alloc_resource(device_t, device_t, int, int *, u_long, - u_long, u_long, u_int); + siba_alloc_resource(device_t, device_t, int, int *, rman_res_t, + rman_res_t, rman_res_t, u_int); static int siba_attach(device_t); #ifdef notyet static void siba_destroy_devinfo(struct siba_devinfo *); @@ -371,7 +371,7 @@ static struct resource * siba_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *rv; struct resource_list *rl; Index: head/sys/dev/siba/siba_bwn.c =================================================================== --- head/sys/dev/siba/siba_bwn.c +++ head/sys/dev/siba/siba_bwn.c @@ -242,7 +242,7 @@ /* proxying to the parent */ static struct resource * siba_bwn_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, Index: head/sys/dev/siba/siba_pcib.c =================================================================== --- head/sys/dev/siba/siba_pcib.c +++ head/sys/dev/siba/siba_pcib.c @@ -92,7 +92,7 @@ int, struct resource *); static struct resource * siba_pcib_alloc_resource(device_t, device_t, int, int *, - u_long , u_long, u_long, u_int); + rman_res_t , rman_res_t, rman_res_t, u_int); static int siba_pcib_attach(device_t); static int siba_pcib_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -249,7 +249,7 @@ static struct resource * siba_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { #if 1 Index: head/sys/dev/siis/siis.c =================================================================== --- head/sys/dev/siis/siis.c +++ head/sys/dev/siis/siis.c @@ -314,7 +314,7 @@ static struct resource * siis_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct siis_controller *ctlr = device_get_softc(dev); int unit = ((struct siis_channel *)device_get_softc(child))->unit; Index: head/sys/dev/snc/if_snc_cbus.c =================================================================== --- head/sys/dev/snc/if_snc_cbus.c +++ head/sys/dev/snc/if_snc_cbus.c @@ -72,7 +72,7 @@ { struct isa_device *idev = DEVTOISA(dev); struct isa_config config; - u_long start, count; + rman_res_t start, count; int rid; bzero(&config, sizeof(config)); Index: head/sys/dev/sound/isa/gusc.c =================================================================== --- head/sys/dev/sound/isa/gusc.c +++ head/sys/dev/sound/isa/gusc.c @@ -91,7 +91,7 @@ static int gusisa_probe(device_t dev); static void gusc_intr(void *); static struct resource *gusc_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags); + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); static int gusc_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); @@ -350,7 +350,7 @@ static struct resource * gusc_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { sc_p scp; int *alloced, rid_max, alloced_max; Index: head/sys/dev/sound/isa/sbc.c =================================================================== --- head/sys/dev/sound/isa/sbc.c +++ head/sys/dev/sound/isa/sbc.c @@ -80,7 +80,7 @@ static void sbc_intr(void *p); static struct resource *sbc_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags); + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); static int sbc_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); static int sbc_setup_intr(device_t dev, device_t child, struct resource *irq, @@ -573,7 +573,7 @@ static struct resource * sbc_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct sbc_softc *scp; int *alloced, rid_max, alloced_max; Index: head/sys/dev/sound/pci/csa.c =================================================================== --- head/sys/dev/sound/pci/csa.c +++ head/sys/dev/sound/pci/csa.c @@ -81,7 +81,8 @@ static int csa_probe(device_t dev); static int csa_attach(device_t dev); static struct resource *csa_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags); + rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); static int csa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); static int csa_setup_intr(device_t bus, device_t child, @@ -396,7 +397,7 @@ static struct resource * csa_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { sc_p scp; csa_res *resp; Index: head/sys/dev/sound/pci/fm801.c =================================================================== --- head/sys/dev/sound/pci/fm801.c +++ head/sys/dev/sound/pci/fm801.c @@ -716,7 +716,8 @@ static struct resource * fm801_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct fm801_info *fm801; Index: head/sys/dev/sound/pci/vibes.c =================================================================== --- head/sys/dev/sound/pci/vibes.c +++ head/sys/dev/sound/pci/vibes.c @@ -721,9 +721,10 @@ static int sv_attach(device_t dev) { struct sc_info *sc; + rman_res_t count, midi_start, games_start; u_int32_t data; char status[SND_STATUSLEN]; - u_long midi_start, games_start, count, sdmaa, sdmac, ml, mu; + u_long sdmaa, sdmac, ml, mu; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); sc->dev = dev; Index: head/sys/dev/stg/tmc18c30_subr.c =================================================================== --- head/sys/dev/stg/tmc18c30_subr.c +++ head/sys/dev/stg/tmc18c30_subr.c @@ -65,7 +65,7 @@ stg_alloc_resource(device_t dev) { struct stg_softc * sc = device_get_softc(dev); - u_long maddr, msize; + rman_res_t maddr, msize; int error; mtx_init(&sc->sc_sclow.sl_lock, "stg", NULL, MTX_DEF); Index: head/sys/dev/wl/if_wl.c =================================================================== --- head/sys/dev/wl/if_wl.c +++ head/sys/dev/wl/if_wl.c @@ -388,7 +388,7 @@ struct wl_softc *sc; char *str = "wl%d: board out of range [0..%d]\n"; u_char inbuf[100]; - unsigned long junk, sirq; + rman_res_t junk, sirq; int error, irq; error = ISA_PNP_PROBE(device_get_parent(device), device, wl_ids); Index: head/sys/isa/isa_common.h =================================================================== --- head/sys/isa/isa_common.h +++ head/sys/isa/isa_common.h @@ -69,7 +69,8 @@ */ extern void isa_init(device_t dev); extern struct resource *isa_alloc_resource(device_t bus, device_t child, - int type, int *rid, u_long start, u_long end, u_long count, u_int flags); + int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags); extern int isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); Index: head/sys/isa/isa_common.c =================================================================== --- head/sys/isa/isa_common.c +++ head/sys/isa/isa_common.c @@ -928,7 +928,7 @@ static int isa_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { struct isa_device* idev = DEVTOISA(child); struct resource_list *rl = &idev->id_resources; Index: head/sys/kern/bus_if.m =================================================================== --- head/sys/kern/bus_if.m +++ head/sys/kern/bus_if.m @@ -44,8 +44,8 @@ CODE { static struct resource * null_alloc_resource(device_t dev, device_t child, - int type, int *rid, u_long start, u_long end, - u_long count, u_int flags) + int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags) { return (0); } @@ -264,9 +264,9 @@ device_t _child; int _type; int *_rid; - u_long _start; - u_long _end; - u_long _count; + rman_res_t _start; + rman_res_t _end; + rman_res_t _count; u_int _flags; } DEFAULT null_alloc_resource; @@ -332,8 +332,8 @@ device_t _child; int _type; struct resource *_res; - u_long _start; - u_long _end; + rman_res_t _start; + rman_res_t _end; }; /** @@ -433,8 +433,8 @@ device_t _child; int _type; int _rid; - u_long _start; - u_long _count; + rman_res_t _start; + rman_res_t _count; }; /** @@ -457,8 +457,8 @@ device_t _child; int _type; int _rid; - u_long *_startp; - u_long *_countp; + rman_res_t *_startp; + rman_res_t *_countp; }; /** Index: head/sys/kern/subr_bus.c =================================================================== --- head/sys/kern/subr_bus.c +++ head/sys/kern/subr_bus.c @@ -3063,8 +3063,8 @@ * @param count XXX end-start+1 */ int -resource_list_add_next(struct resource_list *rl, int type, u_long start, - u_long end, u_long count) +resource_list_add_next(struct resource_list *rl, int type, rman_res_t start, + rman_res_t end, rman_res_t count) { int rid; @@ -3092,7 +3092,7 @@ */ struct resource_list_entry * resource_list_add(struct resource_list *rl, int type, int rid, - u_long start, u_long end, u_long count) + rman_res_t start, rman_res_t end, rman_res_t count) { struct resource_list_entry *rle; @@ -3250,7 +3250,7 @@ */ struct resource * resource_list_reserve(struct resource_list *rl, device_t bus, device_t child, - int type, int *rid, u_long start, u_long end, u_long count, u_int flags) + int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list_entry *rle = NULL; int passthrough = (device_get_parent(child) != bus); @@ -3307,7 +3307,7 @@ */ struct resource * resource_list_alloc(struct resource_list *rl, device_t bus, device_t child, - int type, int *rid, u_long start, u_long end, u_long count, u_int flags) + int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list_entry *rle = NULL; int passthrough = (device_get_parent(child) != bus); @@ -3949,7 +3949,7 @@ */ int bus_generic_adjust_resource(device_t dev, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { /* Propagate up the bus hierarchy until someone handles it. */ if (dev->parent) @@ -3966,7 +3966,7 @@ */ struct resource * bus_generic_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { /* Propagate up the bus hierarchy until someone handles it. */ if (dev->parent) @@ -4104,7 +4104,7 @@ */ int bus_generic_rl_get_resource(device_t dev, device_t child, int type, int rid, - u_long *startp, u_long *countp) + rman_res_t *startp, rman_res_t *countp) { struct resource_list * rl = NULL; struct resource_list_entry * rle = NULL; @@ -4135,7 +4135,7 @@ */ int bus_generic_rl_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { struct resource_list * rl = NULL; @@ -4203,7 +4203,7 @@ */ struct resource * bus_generic_rl_alloc_resource(device_t dev, device_t child, int type, - int *rid, u_long start, u_long end, u_long count, u_int flags) + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list * rl = NULL; @@ -4289,8 +4289,8 @@ * parent of @p dev. */ struct resource * -bus_alloc_resource(device_t dev, int type, int *rid, u_long start, u_long end, - u_long count, u_int flags) +bus_alloc_resource(device_t dev, int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags) { if (dev->parent == NULL) return (NULL); @@ -4305,8 +4305,8 @@ * parent of @p dev. */ int -bus_adjust_resource(device_t dev, int type, struct resource *r, u_long start, - u_long end) +bus_adjust_resource(device_t dev, int type, struct resource *r, rman_res_t start, + rman_res_t end) { if (dev->parent == NULL) return (EINVAL); @@ -4436,7 +4436,7 @@ */ int bus_set_resource(device_t dev, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { return (BUS_SET_RESOURCE(device_get_parent(dev), dev, type, rid, start, count)); @@ -4450,7 +4450,7 @@ */ int bus_get_resource(device_t dev, int type, int rid, - u_long *startp, u_long *countp) + rman_res_t *startp, rman_res_t *countp) { return (BUS_GET_RESOURCE(device_get_parent(dev), dev, type, rid, startp, countp)); @@ -4462,10 +4462,11 @@ * This function simply calls the BUS_GET_RESOURCE() method of the * parent of @p dev and returns the start value. */ -u_long +rman_res_t bus_get_resource_start(device_t dev, int type, int rid) { - u_long start, count; + rman_res_t start; + rman_res_t count; int error; error = BUS_GET_RESOURCE(device_get_parent(dev), dev, type, rid, @@ -4481,10 +4482,11 @@ * This function simply calls the BUS_GET_RESOURCE() method of the * parent of @p dev and returns the count value. */ -u_long +rman_res_t bus_get_resource_count(device_t dev, int type, int rid) { - u_long start, count; + rman_res_t start; + rman_res_t count; int error; error = BUS_GET_RESOURCE(device_get_parent(dev), dev, type, rid, Index: head/sys/kern/subr_rman.c =================================================================== --- head/sys/kern/subr_rman.c +++ head/sys/kern/subr_rman.c @@ -90,8 +90,8 @@ TAILQ_ENTRY(resource_i) r_link; LIST_ENTRY(resource_i) r_sharelink; LIST_HEAD(, resource_i) *r_sharehead; - u_long r_start; /* index of the first entry in this resource */ - u_long r_end; /* index of the last entry (inclusive) */ + rman_res_t r_start; /* index of the first entry in this resource */ + rman_res_t r_end; /* index of the last entry (inclusive) */ u_int r_flags; void *r_virtual; /* virtual address of this resource */ struct device *r_dev; /* device which has allocated this resource */ @@ -154,7 +154,7 @@ } int -rman_manage_region(struct rman *rm, u_long start, u_long end) +rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end) { struct resource_i *r, *s, *t; int rv = 0; @@ -274,7 +274,7 @@ } int -rman_first_free_region(struct rman *rm, u_long *start, u_long *end) +rman_first_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end) { struct resource_i *r; @@ -292,7 +292,7 @@ } int -rman_last_free_region(struct rman *rm, u_long *start, u_long *end) +rman_last_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end) { struct resource_i *r; @@ -311,7 +311,7 @@ /* Shrink or extend one or both ends of an allocated resource. */ int -rman_adjust_resource(struct resource *rr, u_long start, u_long end) +rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) { struct resource_i *r, *s, *t, *new; struct rman *rm; @@ -434,13 +434,13 @@ #define SHARE_TYPE(f) (f & (RF_SHAREABLE | RF_PREFETCHABLE)) struct resource * -rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end, - u_long count, u_long bound, u_int flags, +rman_reserve_resource_bound(struct rman *rm, rman_res_t start, rman_res_t end, + rman_res_t count, rman_res_t bound, u_int flags, struct device *dev) { u_int new_rflags; struct resource_i *r, *s, *rv; - u_long rstart, rend, amask, bmask; + rman_res_t rstart, rend, amask, bmask; rv = NULL; @@ -641,8 +641,8 @@ } struct resource * -rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count, - u_int flags, struct device *dev) +rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags, struct device *dev) { return (rman_reserve_resource_bound(rm, start, end, count, 0, flags, @@ -803,13 +803,13 @@ } void -rman_set_start(struct resource *r, u_long start) +rman_set_start(struct resource *r, rman_res_t start) { r->__r_i->r_start = start; } -u_long +rman_res_t rman_get_start(struct resource *r) { @@ -817,20 +817,20 @@ } void -rman_set_end(struct resource *r, u_long end) +rman_set_end(struct resource *r, rman_res_t end) { r->__r_i->r_end = end; } -u_long +rman_res_t rman_get_end(struct resource *r) { return (r->__r_i->r_end); } -u_long +rman_res_t rman_get_size(struct resource *r) { Index: head/sys/mips/adm5120/admpci.c =================================================================== --- head/sys/mips/adm5120/admpci.c +++ head/sys/mips/adm5120/admpci.c @@ -356,7 +356,7 @@ static struct resource * admpci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { return (NULL); Index: head/sys/mips/adm5120/obio.c =================================================================== --- head/sys/mips/adm5120/obio.c +++ head/sys/mips/adm5120/obio.c @@ -103,8 +103,8 @@ struct resource *); static device_t obio_add_child(device_t, u_int, const char *, int); static struct resource * - obio_alloc_resource(device_t, device_t, int, int *, u_long, - u_long, u_long, u_int); + obio_alloc_resource(device_t, device_t, int, int *, rman_res_t, + rman_res_t, rman_res_t, u_int); static int obio_attach(device_t); static int obio_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -222,7 +222,7 @@ static struct resource * obio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct obio_softc *sc = device_get_softc(bus); struct obio_ivar *ivar = device_get_ivars(child); Index: head/sys/mips/alchemy/obio.c =================================================================== --- head/sys/mips/alchemy/obio.c +++ head/sys/mips/alchemy/obio.c @@ -103,8 +103,8 @@ struct resource *); static device_t obio_add_child(device_t, u_int, const char *, int); static struct resource * - obio_alloc_resource(device_t, device_t, int, int *, u_long, - u_long, u_long, u_int); + obio_alloc_resource(device_t, device_t, int, int *, rman_res_t, + rman_res_t, rman_res_t, u_int); static int obio_attach(device_t); static int obio_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -223,7 +223,7 @@ static struct resource * obio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct obio_softc *sc = device_get_softc(bus); struct obio_ivar *ivar = device_get_ivars(child); Index: head/sys/mips/atheros/apb.c =================================================================== --- head/sys/mips/atheros/apb.c +++ head/sys/mips/atheros/apb.c @@ -63,8 +63,8 @@ struct resource *); static device_t apb_add_child(device_t, u_int, const char *, int); static struct resource * - apb_alloc_resource(device_t, device_t, int, int *, u_long, - u_long, u_long, u_int); + apb_alloc_resource(device_t, device_t, int, int *, rman_res_t, + rman_res_t, rman_res_t, u_int); static int apb_attach(device_t); static int apb_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -161,7 +161,7 @@ static struct resource * apb_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct apb_softc *sc = device_get_softc(bus); struct apb_ivar *ivar = device_get_ivars(child); Index: head/sys/mips/atheros/ar71xx_pci.c =================================================================== --- head/sys/mips/atheros/ar71xx_pci.c +++ head/sys/mips/atheros/ar71xx_pci.c @@ -500,7 +500,7 @@ static struct resource * ar71xx_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ar71xx_pci_softc *sc = device_get_softc(bus); Index: head/sys/mips/atheros/ar724x_pci.c =================================================================== --- head/sys/mips/atheros/ar724x_pci.c +++ head/sys/mips/atheros/ar724x_pci.c @@ -465,7 +465,7 @@ static struct resource * ar724x_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ar71xx_pci_softc *sc = device_get_softc(bus); struct resource *rv; Index: head/sys/mips/atheros/qca955x_pci.c =================================================================== --- head/sys/mips/atheros/qca955x_pci.c +++ head/sys/mips/atheros/qca955x_pci.c @@ -398,7 +398,7 @@ static struct resource * qca955x_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ar71xx_pci_softc *sc = device_get_softc(bus); struct resource *rv; Index: head/sys/mips/beri/beri_simplebus.c =================================================================== --- head/sys/mips/beri/beri_simplebus.c +++ head/sys/mips/beri/beri_simplebus.c @@ -85,7 +85,7 @@ static int simplebus_activate_resource(device_t, device_t, int, int, struct resource *); static struct resource *simplebus_alloc_resource(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); + int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int simplebus_deactivate_resource(device_t, device_t, int, int, struct resource *); static int simplebus_release_resource(device_t, device_t, int, int, @@ -250,7 +250,7 @@ static struct resource * simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { device_t ic; struct simplebus_devinfo *di; Index: head/sys/mips/cavium/ciu.c =================================================================== --- head/sys/mips/cavium/ciu.c +++ head/sys/mips/cavium/ciu.c @@ -75,7 +75,8 @@ static int ciu_probe(device_t); static int ciu_attach(device_t); static struct resource *ciu_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, + u_int); static int ciu_setup_intr(device_t, device_t, struct resource *, int, driver_filter_t *, driver_intr_t *, void *, void **); @@ -171,7 +172,7 @@ static struct resource * ciu_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; struct ciu_softc *sc; Index: head/sys/mips/cavium/obio.c =================================================================== --- head/sys/mips/cavium/obio.c +++ head/sys/mips/cavium/obio.c @@ -119,7 +119,7 @@ static struct resource * obio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *rv; struct rman *rm; Index: head/sys/mips/cavium/octopci.c =================================================================== --- head/sys/mips/cavium/octopci.c +++ head/sys/mips/cavium/octopci.c @@ -86,7 +86,8 @@ static int octopci_read_ivar(device_t, device_t, int, uintptr_t *); static struct resource *octopci_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, + rman_res_t, u_int); static int octopci_activate_resource(device_t, device_t, int, int, struct resource *); static int octopci_maxslots(device_t); @@ -231,7 +232,7 @@ static struct resource * octopci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct octopci_softc *sc; struct resource *res; Index: head/sys/mips/idt/idtpci.c =================================================================== --- head/sys/mips/idt/idtpci.c +++ head/sys/mips/idt/idtpci.c @@ -465,7 +465,7 @@ static struct resource * idtpci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct idtpci_softc *sc = device_get_softc(bus); Index: head/sys/mips/idt/obio.c =================================================================== --- head/sys/mips/idt/obio.c +++ head/sys/mips/idt/obio.c @@ -59,8 +59,8 @@ struct resource *); static device_t obio_add_child(device_t, u_int, const char *, int); static struct resource * - obio_alloc_resource(device_t, device_t, int, int *, u_long, - u_long, u_long, u_int); + obio_alloc_resource(device_t, device_t, int, int *, rman_res_t, + rman_res_t, rman_res_t, u_int); static int obio_attach(device_t); static int obio_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -156,7 +156,7 @@ static struct resource * obio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct obio_softc *sc = device_get_softc(bus); struct obio_ivar *ivar = device_get_ivars(child); Index: head/sys/mips/malta/gt.c =================================================================== --- head/sys/mips/malta/gt.c +++ head/sys/mips/malta/gt.c @@ -76,7 +76,7 @@ static struct resource * gt_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, start, end, count, flags)); Index: head/sys/mips/malta/gt_pci.c =================================================================== --- head/sys/mips/malta/gt_pci.c +++ head/sys/mips/malta/gt_pci.c @@ -150,7 +150,7 @@ uint32_t, int); static int gt_pci_route_interrupt(device_t pcib, device_t dev, int pin); static struct resource * gt_pci_alloc_resource(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); + int *, rman_res_t, rman_res_t, rman_res_t, u_int); static void gt_pci_mask_irq(void *source) @@ -631,7 +631,7 @@ static struct resource * gt_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct gt_pci_softc *sc = device_get_softc(bus); struct resource *rv = NULL; Index: head/sys/mips/malta/obio.c =================================================================== --- head/sys/mips/malta/obio.c +++ head/sys/mips/malta/obio.c @@ -111,7 +111,7 @@ static struct resource * obio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *rv; struct rman *rm; Index: head/sys/mips/mips/cpu.c =================================================================== --- head/sys/mips/mips/cpu.c +++ head/sys/mips/mips/cpu.c @@ -400,7 +400,8 @@ static int cpu_probe(device_t); static int cpu_attach(device_t); static struct resource *cpu_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, + u_int); static int cpu_setup_intr(device_t, device_t, struct resource *, int, driver_filter_t *f, driver_intr_t *, void *, void **); @@ -473,7 +474,7 @@ static struct resource * cpu_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; Index: head/sys/mips/mips/nexus.c =================================================================== --- head/sys/mips/mips/nexus.c +++ head/sys/mips/mips/nexus.c @@ -81,22 +81,22 @@ static struct rman mem_rman; static struct resource * - nexus_alloc_resource(device_t, device_t, int, int *, u_long, - u_long, u_long, u_int); + nexus_alloc_resource(device_t, device_t, int, int *, rman_res_t, + rman_res_t, rman_res_t, u_int); static device_t nexus_add_child(device_t, u_int, const char *, int); static int nexus_attach(device_t); static void nexus_delete_resource(device_t, device_t, int, int); static struct resource_list * nexus_get_reslist(device_t, device_t); -static int nexus_get_resource(device_t, device_t, int, int, u_long *, - u_long *); +static int nexus_get_resource(device_t, device_t, int, int, rman_res_t *, + rman_res_t *); static int nexus_print_child(device_t, device_t); static int nexus_print_all_resources(device_t dev); static int nexus_probe(device_t); static int nexus_release_resource(device_t, device_t, int, int, struct resource *); -static int nexus_set_resource(device_t, device_t, int, int, u_long, - u_long); +static int nexus_set_resource(device_t, device_t, int, int, rman_res_t, + rman_res_t); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); static int nexus_deactivate_resource(device_t, device_t, int, int, @@ -236,7 +236,7 @@ */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct nexus_device *ndev = DEVTONX(child); struct resource *rv; @@ -313,7 +313,7 @@ static int nexus_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { struct nexus_device *ndev = DEVTONX(child); struct resource_list *rl = &ndev->nx_resources; @@ -332,7 +332,7 @@ static int nexus_get_resource(device_t dev, device_t child, int type, int rid, - u_long *startp, u_long *countp) + rman_res_t *startp, rman_res_t *countp) { struct nexus_device *ndev = DEVTONX(child); struct resource_list *rl = &ndev->nx_resources; Index: head/sys/mips/nlm/xlp_simplebus.c =================================================================== --- head/sys/mips/nlm/xlp_simplebus.c +++ head/sys/mips/nlm/xlp_simplebus.c @@ -72,7 +72,7 @@ */ static int xlp_simplebus_probe(device_t dev); static struct resource *xlp_simplebus_alloc_resource(device_t, device_t, int, - int *, u_long, u_long, u_long, u_int); + int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int xlp_simplebus_activate_resource(device_t, device_t, int, int, struct resource *); static int xlp_simplebus_setup_intr(device_t, device_t, @@ -174,7 +174,7 @@ static struct resource * xlp_simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct rman *rm; struct resource *rv; Index: head/sys/mips/rmi/iodi.c =================================================================== --- head/sys/mips/rmi/iodi.c +++ head/sys/mips/rmi/iodi.c @@ -67,7 +67,7 @@ static struct resource * iodi_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, u_int); static int iodi_activate_resource(device_t, device_t, int, int, @@ -126,7 +126,7 @@ static struct resource * iodi_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res = malloc(sizeof(*res), M_DEVBUF, M_WAITOK); const char *name = device_get_name(child); Index: head/sys/mips/rmi/xlr_pci.c =================================================================== --- head/sys/mips/rmi/xlr_pci.c +++ head/sys/mips/rmi/xlr_pci.c @@ -516,7 +516,7 @@ static struct resource * xlr_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct rman *rm; struct resource *rv; Index: head/sys/mips/rt305x/obio.c =================================================================== --- head/sys/mips/rt305x/obio.c +++ head/sys/mips/rt305x/obio.c @@ -98,8 +98,8 @@ struct resource *); static device_t obio_add_child(device_t, u_int, const char *, int); static struct resource * - obio_alloc_resource(device_t, device_t, int, int *, u_long, - u_long, u_long, u_int); + obio_alloc_resource(device_t, device_t, int, int *, rman_res_t, + rman_res_t, rman_res_t, u_int); static int obio_attach(device_t); static int obio_deactivate_resource(device_t, device_t, int, int, struct resource *); @@ -278,7 +278,7 @@ static struct resource * obio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct obio_softc *sc = device_get_softc(bus); struct obio_ivar *ivar = device_get_ivars(child); Index: head/sys/mips/rt305x/rt305x_gpio.c =================================================================== --- head/sys/mips/rt305x/rt305x_gpio.c +++ head/sys/mips/rt305x/rt305x_gpio.c @@ -546,7 +546,7 @@ #ifdef notyet static struct resource * rt305x_gpio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct obio_softc *sc = device_get_softc(bus); struct resource *rv; Index: head/sys/mips/rt305x/rt305x_pci.c =================================================================== --- head/sys/mips/rt305x/rt305x_pci.c +++ head/sys/mips/rt305x/rt305x_pci.c @@ -204,7 +204,7 @@ static struct resource * rt305x_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct rt305x_pci_softc *sc = device_get_softc(bus); struct resource *rv; Index: head/sys/mips/sentry5/obio.c =================================================================== --- head/sys/mips/sentry5/obio.c +++ head/sys/mips/sentry5/obio.c @@ -113,7 +113,7 @@ static struct resource * obio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *rv; struct rman *rm; Index: head/sys/mips/sibyte/sb_zbbus.c =================================================================== --- head/sys/mips/sibyte/sb_zbbus.c +++ head/sys/mips/sibyte/sb_zbbus.c @@ -280,7 +280,7 @@ static struct resource * zbbus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; int intrnum, intsrc, isdefault; Index: head/sys/mips/sibyte/sb_zbpci.c =================================================================== --- head/sys/mips/sibyte/sb_zbpci.c +++ head/sys/mips/sibyte/sb_zbpci.c @@ -165,7 +165,7 @@ static struct resource * zbpci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; Index: head/sys/pc98/pc98/canbus.c =================================================================== --- head/sys/pc98/pc98/canbus.c +++ head/sys/pc98/pc98/canbus.c @@ -84,7 +84,7 @@ static int canbus_print_child(device_t, device_t); static device_t canbus_add_child(device_t, u_int, const char *, int); static struct resource * canbus_alloc_resource( - device_t, device_t, int, int *, u_long, u_long, u_long, u_int); + device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int canbus_activate_resource( device_t, device_t, int, int, struct resource *); static int canbus_deactivate_resource( @@ -92,7 +92,7 @@ static int canbus_release_resource( device_t, device_t, int, int, struct resource *); static int canbus_set_resource ( - device_t, device_t, int, int, u_long, u_long); + device_t, device_t, int, int, rman_res_t, rman_res_t); static void canbus_delete_resource(device_t, device_t, int, int); /* canbus local function */ @@ -254,7 +254,7 @@ static struct resource * canbus_alloc_resource(device_t dev, device_t child, int type, - int *rid, u_long start, u_long end, u_long count, u_int flags) + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, start, end, count, flags)); @@ -286,7 +286,8 @@ static int canbus_set_resource ( - device_t dev, device_t child, int type, int rid, u_long start, u_long count) + device_t dev, device_t child, int type, int rid, rman_res_t start, + rman_res_t count) { struct canbus_device *cbdev = (struct canbus_device *)device_get_ivars(child); Index: head/sys/powerpc/mpc85xx/lbc.c =================================================================== --- head/sys/powerpc/mpc85xx/lbc.c +++ head/sys/powerpc/mpc85xx/lbc.c @@ -69,7 +69,7 @@ static int lbc_attach(device_t); static int lbc_shutdown(device_t); static struct resource *lbc_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, u_int); static int lbc_print_child(device_t, device_t); static int lbc_release_resource(device_t, device_t, int, int, struct resource *); @@ -663,7 +663,7 @@ static struct resource * lbc_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct lbc_softc *sc; struct lbc_devinfo *di; Index: head/sys/powerpc/ofw/ofw_pci.c =================================================================== --- head/sys/powerpc/ofw/ofw_pci.c +++ head/sys/powerpc/ofw/ofw_pci.c @@ -62,8 +62,8 @@ static int ofw_pci_read_ivar(device_t, device_t, int, uintptr_t *); static struct resource * ofw_pci_alloc_resource(device_t bus, - device_t child, int type, int *rid, u_long start, - u_long end, u_long count, u_int flags); + device_t child, int type, int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags); static int ofw_pci_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res); static int ofw_pci_activate_resource(device_t bus, device_t child, @@ -72,8 +72,8 @@ device_t child, int type, int rid, struct resource *res); static int ofw_pci_adjust_resource(device_t bus, device_t child, - int type, struct resource *res, u_long start, - u_long end); + int type, struct resource *res, rman_res_t start, + rman_res_t end); /* * pcib interface. @@ -304,7 +304,7 @@ static struct resource * ofw_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ofw_pci_softc *sc; struct resource *rv; @@ -450,7 +450,7 @@ static int ofw_pci_adjust_resource(device_t bus, device_t child, int type, - struct resource *res, u_long start, u_long end) + struct resource *res, rman_res_t start, rman_res_t end) { struct rman *rm = NULL; struct ofw_pci_softc *sc = device_get_softc(bus); Index: head/sys/powerpc/powermac/macgpio.c =================================================================== --- head/sys/powerpc/powermac/macgpio.c +++ head/sys/powerpc/powermac/macgpio.c @@ -71,7 +71,7 @@ static int macgpio_print_child(device_t dev, device_t child); static void macgpio_probe_nomatch(device_t, device_t); static struct resource *macgpio_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, u_int); static int macgpio_activate_resource(device_t, device_t, int, int, struct resource *); static int macgpio_deactivate_resource(device_t, device_t, int, int, @@ -267,7 +267,8 @@ static struct resource * macgpio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct macgpio_devinfo *dinfo; Index: head/sys/powerpc/powermac/macio.c =================================================================== --- head/sys/powerpc/powermac/macio.c +++ head/sys/powerpc/powermac/macio.c @@ -78,7 +78,8 @@ static int macio_print_child(device_t dev, device_t child); static void macio_probe_nomatch(device_t, device_t); static struct resource *macio_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, + u_int); static int macio_activate_resource(device_t, device_t, int, int, struct resource *); static int macio_deactivate_resource(device_t, device_t, int, int, @@ -479,7 +480,8 @@ static struct resource * macio_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct macio_softc *sc; int needactivate; Index: head/sys/powerpc/powermac/uninorth.c =================================================================== --- head/sys/powerpc/powermac/uninorth.c +++ head/sys/powerpc/powermac/uninorth.c @@ -72,7 +72,8 @@ static int unin_chip_print_child(device_t dev, device_t child); static void unin_chip_probe_nomatch(device_t, device_t); static struct resource *unin_chip_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, + rman_res_t, u_int); static int unin_chip_activate_resource(device_t, device_t, int, int, struct resource *); static int unin_chip_deactivate_resource(device_t, device_t, int, int, @@ -455,7 +456,8 @@ static struct resource * unin_chip_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct unin_chip_softc *sc; int needactivate; Index: head/sys/powerpc/psim/ata_iobus.c =================================================================== --- head/sys/powerpc/psim/ata_iobus.c +++ head/sys/powerpc/psim/ata_iobus.c @@ -59,7 +59,8 @@ static int ata_iobus_probe(device_t dev); static int ata_iobus_print_child(device_t dev, device_t child); struct resource *ata_iobus_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, + u_int); static int ata_iobus_release_resource(device_t, device_t, int, int, struct resource *); @@ -135,7 +136,8 @@ struct resource * ata_iobus_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct resource *res = NULL; int myrid; Index: head/sys/powerpc/psim/iobus.c =================================================================== --- head/sys/powerpc/psim/iobus.c +++ head/sys/powerpc/psim/iobus.c @@ -72,7 +72,8 @@ static int iobus_read_ivar(device_t, device_t, int, uintptr_t *); static int iobus_write_ivar(device_t, device_t, int, uintptr_t); static struct resource *iobus_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, + u_int); static int iobus_activate_resource(device_t, device_t, int, int, struct resource *); static int iobus_deactivate_resource(device_t, device_t, int, int, @@ -305,7 +306,8 @@ static struct resource * iobus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct iobus_softc *sc; int needactivate; Index: head/sys/sparc64/central/central.c =================================================================== --- head/sys/sparc64/central/central.c +++ head/sys/sparc64/central/central.c @@ -183,8 +183,8 @@ static int central_adjust_resource(device_t bus __unused, device_t child __unused, - int type __unused, struct resource *r __unused, u_long start __unused, - u_long end __unused) + int type __unused, struct resource *r __unused, rman_res_t start __unused, + rman_res_t end __unused) { return (ENXIO); @@ -215,7 +215,7 @@ static struct resource * central_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list *rl; struct resource_list_entry *rle; Index: head/sys/sparc64/ebus/ebus.c =================================================================== --- head/sys/sparc64/ebus/ebus.c +++ head/sys/sparc64/ebus/ebus.c @@ -427,7 +427,7 @@ static struct resource * ebus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ebus_softc *sc; struct resource_list *rl; @@ -544,8 +544,8 @@ static int ebus_adjust_resource(device_t bus __unused, device_t child __unused, - int type __unused, struct resource *res __unused, u_long start __unused, - u_long end __unused) + int type __unused, struct resource *res __unused, rman_res_t start __unused, + rman_res_t end __unused) { return (ENXIO); Index: head/sys/sparc64/fhc/fhc.c =================================================================== --- head/sys/sparc64/fhc/fhc.c +++ head/sys/sparc64/fhc/fhc.c @@ -420,7 +420,7 @@ static struct resource * fhc_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list *rl; struct resource_list_entry *rle; @@ -479,8 +479,8 @@ static int fhc_adjust_resource(device_t bus __unused, device_t child __unused, - int type __unused, struct resource *r __unused, u_long start __unused, - u_long end __unused) + int type __unused, struct resource *r __unused, rman_res_t start __unused, + rman_res_t end __unused) { return (ENXIO); Index: head/sys/sparc64/isa/isa.c =================================================================== --- head/sys/sparc64/isa/isa.c +++ head/sys/sparc64/isa/isa.c @@ -273,7 +273,7 @@ struct resource * isa_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { /* * Consider adding a resource definition. Index: head/sys/sparc64/pci/apb.c =================================================================== --- head/sys/sparc64/pci/apb.c +++ head/sys/sparc64/pci/apb.c @@ -130,7 +130,7 @@ } static void -apb_map_print(uint8_t map, u_long scale) +apb_map_print(uint8_t map, rman_res_t scale) { int i, first; @@ -144,7 +144,7 @@ } static int -apb_checkrange(uint8_t map, u_long scale, u_long start, u_long end) +apb_checkrange(uint8_t map, rman_res_t scale, rman_res_t start, rman_res_t end) { int i, ei; @@ -227,7 +227,7 @@ */ static struct resource * apb_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct apb_softc *sc; @@ -287,7 +287,7 @@ static int apb_adjust_resource(device_t dev, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct apb_softc *sc; Index: head/sys/sparc64/pci/fire.c =================================================================== --- head/sys/sparc64/pci/fire.c +++ head/sys/sparc64/pci/fire.c @@ -1852,7 +1852,7 @@ static struct resource * fire_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct fire_softc *sc; Index: head/sys/sparc64/pci/ofw_pci.c =================================================================== --- head/sys/sparc64/pci/ofw_pci.c +++ head/sys/sparc64/pci/ofw_pci.c @@ -287,7 +287,7 @@ struct resource * ofw_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ofw_pci_softc *sc; struct resource *rv; @@ -362,7 +362,7 @@ int ofw_pci_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct ofw_pci_softc *sc; struct rman *rm; Index: head/sys/sparc64/pci/psycho.c =================================================================== --- head/sys/sparc64/pci/psycho.c +++ head/sys/sparc64/pci/psycho.c @@ -1038,7 +1038,7 @@ static struct resource * psycho_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct psycho_softc *sc; Index: head/sys/sparc64/pci/sbbc.c =================================================================== --- head/sys/sparc64/pci/sbbc.c +++ head/sys/sparc64/pci/sbbc.c @@ -397,7 +397,7 @@ static struct resource * sbbc_bus_alloc_resource(device_t dev, device_t child __unused, int type, - int *rid, u_long start, u_long end, u_long count, u_int flags) + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct sbbc_softc *sc; @@ -435,8 +435,8 @@ static int sbbc_bus_adjust_resource(device_t bus __unused, device_t child __unused, - int type __unused, struct resource *res __unused, u_long start __unused, - u_long end __unused) + int type __unused, struct resource *res __unused, rman_res_t start __unused, + rman_res_t end __unused) { return (ENXIO); Index: head/sys/sparc64/pci/schizo.c =================================================================== --- head/sys/sparc64/pci/schizo.c +++ head/sys/sparc64/pci/schizo.c @@ -1196,7 +1196,7 @@ static struct resource * schizo_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct schizo_softc *sc; Index: head/sys/sparc64/sbus/sbus.c =================================================================== --- head/sys/sparc64/sbus/sbus.c +++ head/sys/sparc64/sbus/sbus.c @@ -710,7 +710,7 @@ static struct resource * sbus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct sbus_softc *sc; struct rman *rm; @@ -821,7 +821,7 @@ static int sbus_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct sbus_softc *sc; int i; Index: head/sys/sparc64/sparc64/nexus.c =================================================================== --- head/sys/sparc64/sparc64/nexus.c +++ head/sys/sparc64/sparc64/nexus.c @@ -359,7 +359,7 @@ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct nexus_softc *sc; struct rman *rm; @@ -445,7 +445,7 @@ static int nexus_adjust_resource(device_t bus, device_t child __unused, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct nexus_softc *sc; struct rman *rm; Index: head/sys/sparc64/sparc64/upa.c =================================================================== --- head/sys/sparc64/sparc64/upa.c +++ head/sys/sparc64/sparc64/upa.c @@ -194,7 +194,7 @@ int i, imr, j, rid; #if 1 device_t *children, schizo; - u_long scount, sstart, ucount, ustart; + rman_res_t scount, sstart, ucount, ustart; int nchildren; #endif @@ -403,7 +403,7 @@ static struct resource * upa_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list *rl; struct resource_list_entry *rle; @@ -510,8 +510,8 @@ static int upa_adjust_resource(device_t bus __unused, device_t child __unused, - int type __unused, struct resource *r __unused, u_long start __unused, - u_long end __unused) + int type __unused, struct resource *r __unused, rman_res_t start __unused, + rman_res_t end __unused) { return (ENXIO); Index: head/sys/sys/_types.h =================================================================== --- head/sys/sys/_types.h +++ head/sys/sys/_types.h @@ -112,4 +112,6 @@ __int64_t _mbstateL; /* for alignment */ } __mbstate_t; +typedef unsigned long __rman_res_t; + #endif /* !_SYS__TYPES_H_ */ Index: head/sys/sys/bus.h =================================================================== --- head/sys/sys/bus.h +++ head/sys/sys/bus.h @@ -292,9 +292,9 @@ int rid; /**< @brief resource identifier */ int flags; /**< @brief resource flags */ struct resource *res; /**< @brief the real resource when allocated */ - u_long start; /**< @brief start of resource range */ - u_long end; /**< @brief end of resource range */ - u_long count; /**< @brief count within range */ + rman_res_t start; /**< @brief start of resource range */ + rman_res_t end; /**< @brief end of resource range */ + rman_res_t count; /**< @brief count within range */ }; STAILQ_HEAD(resource_list, resource_list_entry); @@ -307,10 +307,10 @@ struct resource_list_entry * resource_list_add(struct resource_list *rl, int type, int rid, - u_long start, u_long end, u_long count); + rman_res_t start, rman_res_t end, rman_res_t count); int resource_list_add_next(struct resource_list *rl, int type, - u_long start, u_long end, u_long count); + rman_res_t start, rman_res_t end, rman_res_t count); int resource_list_busy(struct resource_list *rl, int type, int rid); int resource_list_reserved(struct resource_list *rl, int type, int rid); @@ -323,8 +323,8 @@ resource_list_alloc(struct resource_list *rl, device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, - u_long count, u_int flags); + rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); int resource_list_release(struct resource_list *rl, device_t bus, device_t child, int type, int rid, struct resource *res); @@ -335,8 +335,8 @@ resource_list_reserve(struct resource_list *rl, device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, - u_long count, u_int flags); + rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); int resource_list_unreserve(struct resource_list *rl, device_t bus, device_t child, int type, int rid); @@ -362,12 +362,12 @@ bus_generic_add_child(device_t dev, u_int order, const char *name, int unit); int bus_generic_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, u_long start, - u_long end); + struct resource *r, rman_res_t start, + rman_res_t end); struct resource * bus_generic_alloc_resource(device_t bus, device_t child, int type, - int *rid, u_long start, u_long end, - u_long count, u_int flags); + int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); int bus_generic_attach(device_t dev); int bus_generic_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu); @@ -405,12 +405,12 @@ struct resource * bus_generic_rl_alloc_resource (device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, u_int); void bus_generic_rl_delete_resource (device_t, device_t, int, int); -int bus_generic_rl_get_resource (device_t, device_t, int, int, u_long *, - u_long *); -int bus_generic_rl_set_resource (device_t, device_t, int, int, u_long, - u_long); +int bus_generic_rl_get_resource (device_t, device_t, int, int, rman_res_t *, + rman_res_t *); +int bus_generic_rl_set_resource (device_t, device_t, int, int, rman_res_t, + rman_res_t); int bus_generic_rl_release_resource (device_t, device_t, int, int, struct resource *); @@ -439,10 +439,10 @@ struct resource **res); int bus_adjust_resource(device_t child, int type, struct resource *r, - u_long start, u_long end); + rman_res_t start, rman_res_t end); struct resource *bus_alloc_resource(device_t dev, int type, int *rid, - u_long start, u_long end, u_long count, - u_int flags); + rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); int bus_activate_resource(device_t dev, int type, int rid, struct resource *r); int bus_deactivate_resource(device_t dev, int type, int rid, @@ -460,11 +460,11 @@ int bus_describe_intr(device_t dev, struct resource *irq, void *cookie, const char *fmt, ...); int bus_set_resource(device_t dev, int type, int rid, - u_long start, u_long count); + rman_res_t start, rman_res_t count); int bus_get_resource(device_t dev, int type, int rid, - u_long *startp, u_long *countp); -u_long bus_get_resource_start(device_t dev, int type, int rid); -u_long bus_get_resource_count(device_t dev, int type, int rid); + rman_res_t *startp, rman_res_t *countp); +rman_res_t bus_get_resource_start(device_t dev, int type, int rid); +rman_res_t bus_get_resource_count(device_t dev, int type, int rid); void bus_delete_resource(device_t dev, int type, int rid); int bus_child_present(device_t child); int bus_child_pnpinfo_str(device_t child, char *buf, size_t buflen); Index: head/sys/sys/rman.h =================================================================== --- head/sys/sys/rman.h +++ head/sys/sys/rman.h @@ -61,6 +61,8 @@ */ #define RM_TEXTLEN 32 +#define RM_MAX_END ((rman_res_t)~0) + /* * Userspace-exported structures. */ @@ -70,8 +72,8 @@ uintptr_t r_device; /* device owning this resource */ char r_devname[RM_TEXTLEN]; /* device name XXX obsolete */ - u_long r_start; /* offset in resource space */ - u_long r_size; /* size in resource space */ + rman_res_t r_start; /* offset in resource space */ + rman_res_t r_size; /* size in resource space */ u_int r_flags; /* RF_* flags */ }; @@ -79,8 +81,8 @@ uintptr_t rm_handle; /* rman uniquifier */ char rm_descr[RM_TEXTLEN]; /* rman description */ - u_long rm_start; /* base of managed region */ - u_long rm_size; /* size of managed region */ + rman_res_t rm_start; /* base of managed region */ + bus_size_t rm_size; /* size of managed region */ enum rman_type rm_type; /* region type */ }; @@ -108,47 +110,47 @@ struct resource_head rm_list; struct mtx *rm_mtx; /* mutex used to protect rm_list */ TAILQ_ENTRY(rman) rm_link; /* link in list of all rmans */ - u_long rm_start; /* index of globally first entry */ - u_long rm_end; /* index of globally last entry */ + rman_res_t rm_start; /* index of globally first entry */ + rman_res_t rm_end; /* index of globally last entry */ enum rman_type rm_type; /* what type of resource this is */ const char *rm_descr; /* text descripion of this resource */ }; TAILQ_HEAD(rman_head, rman); int rman_activate_resource(struct resource *r); -int rman_adjust_resource(struct resource *r, u_long start, u_long end); +int rman_adjust_resource(struct resource *r, rman_res_t start, rman_res_t end); int rman_await_resource(struct resource *r, int pri, int timo); -int rman_first_free_region(struct rman *rm, u_long *start, u_long *end); +int rman_first_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end); bus_space_handle_t rman_get_bushandle(struct resource *); bus_space_tag_t rman_get_bustag(struct resource *); -u_long rman_get_end(struct resource *); +rman_res_t rman_get_end(struct resource *); struct device *rman_get_device(struct resource *); u_int rman_get_flags(struct resource *); int rman_get_rid(struct resource *); -u_long rman_get_size(struct resource *); -u_long rman_get_start(struct resource *); +rman_res_t rman_get_size(struct resource *); +rman_res_t rman_get_start(struct resource *); void *rman_get_virtual(struct resource *); int rman_deactivate_resource(struct resource *r); int rman_fini(struct rman *rm); int rman_init(struct rman *rm); int rman_init_from_resource(struct rman *rm, struct resource *r); -int rman_last_free_region(struct rman *rm, u_long *start, u_long *end); +int rman_last_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end); uint32_t rman_make_alignment_flags(uint32_t size); -int rman_manage_region(struct rman *rm, u_long start, u_long end); +int rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end); int rman_is_region_manager(struct resource *r, struct rman *rm); int rman_release_resource(struct resource *r); -struct resource *rman_reserve_resource(struct rman *rm, u_long start, - u_long end, u_long count, +struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags, struct device *dev); -struct resource *rman_reserve_resource_bound(struct rman *rm, u_long start, - u_long end, u_long count, u_long bound, +struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start, + rman_res_t end, rman_res_t count, rman_res_t bound, u_int flags, struct device *dev); void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h); void rman_set_bustag(struct resource *_r, bus_space_tag_t _t); void rman_set_device(struct resource *_r, struct device *_dev); -void rman_set_end(struct resource *_r, u_long _end); +void rman_set_end(struct resource *_r, rman_res_t _end); void rman_set_rid(struct resource *_r, int _rid); -void rman_set_start(struct resource *_r, u_long _start); +void rman_set_start(struct resource *_r, rman_res_t _start); void rman_set_virtual(struct resource *_r, void *_v); extern struct rman_head rman_head; Index: head/sys/sys/types.h =================================================================== --- head/sys/sys/types.h +++ head/sys/sys/types.h @@ -250,6 +250,8 @@ typedef __vm_pindex_t vm_pindex_t; typedef __vm_size_t vm_size_t; +typedef __rman_res_t rman_res_t; + #ifdef _KERNEL typedef int boolean_t; typedef struct device *device_t; Index: head/sys/x86/include/legacyvar.h =================================================================== --- head/sys/x86/include/legacyvar.h +++ head/sys/x86/include/legacyvar.h @@ -56,9 +56,10 @@ int legacy_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); struct resource *legacy_pcib_alloc_resource(device_t dev, device_t child, - int type, int *rid, u_long start, u_long end, u_long count, u_int flags); + int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags); int legacy_pcib_adjust_resource(device_t dev, device_t child, int type, - struct resource *r, u_long start, u_long end); + struct resource *r, rman_res_t start, rman_res_t end); int legacy_pcib_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, Index: head/sys/x86/include/pci_cfgreg.h =================================================================== --- head/sys/x86/include/pci_cfgreg.h +++ head/sys/x86/include/pci_cfgreg.h @@ -46,7 +46,7 @@ #define CONF2_ENABLE_CHK 0x0e #define CONF2_ENABLE_RES 0x0e -u_long hostb_alloc_start(int type, u_long start, u_long end, u_long count); +rman_res_t hostb_alloc_start(int type, rman_res_t start, rman_res_t end, rman_res_t count); int pcie_cfgregopen(uint64_t base, uint8_t minbus, uint8_t maxbus); int pci_cfgregopen(void); u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes); Index: head/sys/x86/isa/atrtc.c =================================================================== --- head/sys/x86/isa/atrtc.c +++ head/sys/x86/isa/atrtc.c @@ -241,7 +241,7 @@ atrtc_attach(device_t dev) { struct atrtc_softc *sc; - u_long s; + rman_res_t s; int i; sc = device_get_softc(dev); Index: head/sys/x86/isa/clock.c =================================================================== --- head/sys/x86/isa/clock.c +++ head/sys/x86/isa/clock.c @@ -656,7 +656,7 @@ attimer_attach(device_t dev) { struct attimer_softc *sc; - u_long s; + rman_res_t s; int i; attimer_sc = sc = device_get_softc(dev); Index: head/sys/x86/isa/isa.c =================================================================== --- head/sys/x86/isa/isa.c +++ head/sys/x86/isa/isa.c @@ -88,7 +88,7 @@ */ struct resource * isa_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { /* * Consider adding a resource definition. Index: head/sys/x86/pci/pci_bus.c =================================================================== --- head/sys/x86/pci/pci_bus.c +++ head/sys/x86/pci/pci_bus.c @@ -578,8 +578,8 @@ SYSCTL_ULONG(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, &host_mem_start, 0, "Limit the host bridge memory to being above this address."); -u_long -hostb_alloc_start(int type, u_long start, u_long end, u_long count) +rman_res_t +hostb_alloc_start(int type, rman_res_t start, rman_res_t end, rman_res_t count) { if (start + count - 1 != end) { @@ -593,7 +593,7 @@ struct resource * legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { #if defined(NEW_PCIB) && defined(PCI_RES_BUS) @@ -609,7 +609,7 @@ #if defined(NEW_PCIB) && defined(PCI_RES_BUS) int legacy_pcib_adjust_resource(device_t dev, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { if (type == PCI_RES_BUS) Index: head/sys/x86/pci/qpi.c =================================================================== --- head/sys/x86/pci/qpi.c +++ head/sys/x86/pci/qpi.c @@ -241,7 +241,7 @@ #if defined(NEW_PCIB) && defined(PCI_RES_BUS) static struct resource * qpi_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { if (type == PCI_RES_BUS) Index: head/sys/x86/x86/mptable_pci.c =================================================================== --- head/sys/x86/x86/mptable_pci.c +++ head/sys/x86/x86/mptable_pci.c @@ -75,7 +75,7 @@ #ifdef NEW_PCIB static int -mptable_is_isa_range(u_long start, u_long end) +mptable_is_isa_range(rman_res_t start, rman_res_t end) { if (end >= 0x10000) @@ -88,7 +88,7 @@ } static int -mptable_is_vga_range(u_long start, u_long end) +mptable_is_vga_range(rman_res_t start, rman_res_t end) { if (end >= 0x10000) return (0); @@ -101,7 +101,7 @@ static struct resource * mptable_hostb_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mptable_hostb_softc *sc; @@ -142,7 +142,7 @@ static int mptable_hostb_adjust_resource(device_t dev, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct mptable_hostb_softc *sc; Index: head/sys/x86/x86/nexus.c =================================================================== --- head/sys/x86/x86/nexus.c +++ head/sys/x86/x86/nexus.c @@ -99,9 +99,10 @@ static device_t nexus_add_child(device_t bus, u_int order, const char *name, int unit); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); + rman_res_t, rman_res_t, rman_res_t, + u_int); static int nexus_adjust_resource(device_t, device_t, int, struct resource *, - u_long, u_long); + rman_res_t, rman_res_t); #ifdef SMP static int nexus_bind_intr(device_t, device_t, struct resource *, int); #endif @@ -122,8 +123,10 @@ static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); static struct resource_list *nexus_get_reslist(device_t dev, device_t child); -static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long); -static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *); +static int nexus_set_resource(device_t, device_t, int, int, + rman_res_t, rman_res_t); +static int nexus_get_resource(device_t, device_t, int, int, + rman_res_t *, rman_res_t *); static void nexus_delete_resource(device_t, device_t, int, int); #ifdef DEV_APIC static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); @@ -359,7 +362,8 @@ */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) { struct nexus_device *ndev = DEVTONX(child); struct resource *rv; @@ -406,7 +410,7 @@ static int nexus_adjust_resource(device_t bus, device_t child, int type, - struct resource *r, u_long start, u_long end) + struct resource *r, rman_res_t start, rman_res_t end) { struct rman *rm; @@ -574,7 +578,8 @@ } static int -nexus_set_resource(device_t dev, device_t child, int type, int rid, u_long start, u_long count) +nexus_set_resource(device_t dev, device_t child, int type, int rid, + rman_res_t start, rman_res_t count) { struct nexus_device *ndev = DEVTONX(child); struct resource_list *rl = &ndev->nx_resources; @@ -585,7 +590,8 @@ } static int -nexus_get_resource(device_t dev, device_t child, int type, int rid, u_long *startp, u_long *countp) +nexus_get_resource(device_t dev, device_t child, int type, int rid, + rman_res_t *startp, rman_res_t *countp) { struct nexus_device *ndev = DEVTONX(child); struct resource_list *rl = &ndev->nx_resources;