summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2016-01-27 02:23:54 +0000
committerjhibbits <jhibbits@FreeBSD.org>2016-01-27 02:23:54 +0000
commit31bb8ee5bdf9a6332a86e4774ebdccba877ce42e (patch)
tree5ac500b634909ff3fe2556201aef7e16d85316d2
parentd2ca0a07825355904475b1fe585efdd49eeae0b3 (diff)
downloadFreeBSD-src-31bb8ee5bdf9a6332a86e4774ebdccba877ce42e.zip
FreeBSD-src-31bb8ee5bdf9a6332a86e4774ebdccba877ce42e.tar.gz
Convert rman to use rman_res_t instead of u_long
Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075
-rw-r--r--lib/libdevinfo/devinfo.38
-rw-r--r--lib/libdevinfo/devinfo.h8
-rw-r--r--share/man/man9/bus_adjust_resource.93
-rw-r--r--share/man/man9/bus_alloc_resource.95
-rw-r--r--share/man/man9/bus_get_resource.92
-rw-r--r--share/man/man9/bus_set_resource.92
-rw-r--r--share/man/man9/rman.920
-rw-r--r--sys/arm/arm/nexus.c4
-rw-r--r--sys/arm/at91/at91.c4
-rw-r--r--sys/arm/cavium/cns11xx/econa.c2
-rw-r--r--sys/arm/mv/mv_localbus.c4
-rw-r--r--sys/arm/mv/mv_pci.c4
-rw-r--r--sys/arm/versatile/versatile_pci.c2
-rw-r--r--sys/arm/xscale/i8134x/i81342.c2
-rw-r--r--sys/arm/xscale/i8134x/i81342_pci.c4
-rw-r--r--sys/arm/xscale/i8134x/obio.c2
-rw-r--r--sys/arm/xscale/ixp425/avila_ata.c2
-rw-r--r--sys/arm/xscale/ixp425/ixp425.c2
-rw-r--r--sys/arm/xscale/ixp425/ixp425_pci.c2
-rw-r--r--sys/arm/xscale/pxa/pxa_obio.c8
-rw-r--r--sys/arm/xscale/pxa/pxa_smi.c4
-rw-r--r--sys/arm64/arm64/gic_v3_fdt.c4
-rw-r--r--sys/arm64/arm64/nexus.c9
-rw-r--r--sys/arm64/cavium/thunder_pcie.c6
-rw-r--r--sys/arm64/cavium/thunder_pcie_pem.c6
-rw-r--r--sys/dev/acpica/acpi.c20
-rw-r--r--sys/dev/acpica/acpi_hpet.c2
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c12
-rw-r--r--sys/dev/acpica/acpi_resource.c2
-rw-r--r--sys/dev/acpica/acpi_timer.c2
-rw-r--r--sys/dev/acpica/acpivar.h3
-rw-r--r--sys/dev/advansys/adv_isa.c2
-rw-r--r--sys/dev/ahci/ahci.c2
-rw-r--r--sys/dev/ahci/ahci.h2
-rw-r--r--sys/dev/ata/ata-cbus.c5
-rw-r--r--sys/dev/ata/ata-isa.c4
-rw-r--r--sys/dev/ata/ata-pci.c3
-rw-r--r--sys/dev/ata/ata-pci.h2
-rw-r--r--sys/dev/atkbdc/atkbdc_ebus.c4
-rw-r--r--sys/dev/atkbdc/atkbdc_isa.c10
-rw-r--r--sys/dev/atkbdc/atkbdc_subr.c2
-rw-r--r--sys/dev/cs/if_cs.c2
-rw-r--r--sys/dev/ctau/if_ct.c10
-rw-r--r--sys/dev/cx/if_cx.c10
-rw-r--r--sys/dev/ed/if_ed_3c503.c2
-rw-r--r--sys/dev/ed/if_ed_cbus.c12
-rw-r--r--sys/dev/ed/if_ed_hpp.c2
-rw-r--r--sys/dev/ed/if_ed_wd80x3.c2
-rw-r--r--sys/dev/eisa/eisaconf.c2
-rw-r--r--sys/dev/fdt/simplebus.c4
-rw-r--r--sys/dev/fe/if_fe_cbus.c14
-rw-r--r--sys/dev/fe/if_fe_isa.c12
-rw-r--r--sys/dev/gpio/gpiobus.c4
-rw-r--r--sys/dev/mca/mca_bus.c2
-rw-r--r--sys/dev/mvs/mvs_pci.c3
-rw-r--r--sys/dev/mvs/mvs_soc.c2
-rw-r--r--sys/dev/ncv/ncr53c500_pccard.c2
-rw-r--r--sys/dev/nsp/nsp_pccard.c2
-rw-r--r--sys/dev/ofw/ofwbus.c4
-rw-r--r--sys/dev/pccard/pccard.c20
-rw-r--r--sys/dev/pccard/pccardvarp.h10
-rw-r--r--sys/dev/pccbb/pccbb.c12
-rw-r--r--sys/dev/pccbb/pccbb_pci.c4
-rw-r--r--sys/dev/pccbb/pccbbvar.h2
-rw-r--r--sys/dev/pcf/pcf_isa.c2
-rw-r--r--sys/dev/pci/hostb_pci.c2
-rw-r--r--sys/dev/pci/isa_pci.c6
-rw-r--r--sys/dev/pci/pci.c14
-rw-r--r--sys/dev/pci/pci_host_generic.c8
-rw-r--r--sys/dev/pci/pci_iov.c8
-rw-r--r--sys/dev/pci/pci_pci.c47
-rw-r--r--sys/dev/pci/pci_private.h12
-rw-r--r--sys/dev/pci/pci_subr.c16
-rw-r--r--sys/dev/pci/pcib_private.h21
-rw-r--r--sys/dev/pci/pcivar.h4
-rw-r--r--sys/dev/pci/vga_pci.c5
-rw-r--r--sys/dev/ppc/ppc.c4
-rw-r--r--sys/dev/ppc/ppcvar.h2
-rw-r--r--sys/dev/puc/puc.c8
-rw-r--r--sys/dev/puc/puc_bfe.h6
-rw-r--r--sys/dev/quicc/quicc_bfe.h5
-rw-r--r--sys/dev/quicc/quicc_core.c6
-rw-r--r--sys/dev/scc/scc_bfe.h4
-rw-r--r--sys/dev/scc/scc_core.c6
-rw-r--r--sys/dev/siba/siba.c6
-rw-r--r--sys/dev/siba/siba_bwn.c2
-rw-r--r--sys/dev/siba/siba_pcib.c4
-rw-r--r--sys/dev/siis/siis.c2
-rw-r--r--sys/dev/snc/if_snc_cbus.c2
-rw-r--r--sys/dev/sound/isa/gusc.c4
-rw-r--r--sys/dev/sound/isa/sbc.c4
-rw-r--r--sys/dev/sound/pci/csa.c5
-rw-r--r--sys/dev/sound/pci/fm801.c3
-rw-r--r--sys/dev/sound/pci/vibes.c3
-rw-r--r--sys/dev/stg/tmc18c30_subr.c2
-rw-r--r--sys/dev/wl/if_wl.c2
-rw-r--r--sys/isa/isa_common.c2
-rw-r--r--sys/isa/isa_common.h3
-rw-r--r--sys/kern/bus_if.m22
-rw-r--r--sys/kern/subr_bus.c42
-rw-r--r--sys/kern/subr_rman.c32
-rw-r--r--sys/mips/adm5120/admpci.c2
-rw-r--r--sys/mips/adm5120/obio.c6
-rw-r--r--sys/mips/alchemy/obio.c6
-rw-r--r--sys/mips/atheros/apb.c6
-rw-r--r--sys/mips/atheros/ar71xx_pci.c2
-rw-r--r--sys/mips/atheros/ar724x_pci.c2
-rw-r--r--sys/mips/atheros/qca955x_pci.c2
-rw-r--r--sys/mips/beri/beri_simplebus.c4
-rw-r--r--sys/mips/cavium/ciu.c5
-rw-r--r--sys/mips/cavium/obio.c2
-rw-r--r--sys/mips/cavium/octopci.c5
-rw-r--r--sys/mips/idt/idtpci.c2
-rw-r--r--sys/mips/idt/obio.c6
-rw-r--r--sys/mips/malta/gt.c2
-rw-r--r--sys/mips/malta/gt_pci.c4
-rw-r--r--sys/mips/malta/obio.c2
-rw-r--r--sys/mips/mips/cpu.c5
-rw-r--r--sys/mips/mips/nexus.c18
-rw-r--r--sys/mips/nlm/xlp_simplebus.c4
-rw-r--r--sys/mips/rmi/iodi.c4
-rw-r--r--sys/mips/rmi/xlr_pci.c2
-rw-r--r--sys/mips/rt305x/obio.c6
-rw-r--r--sys/mips/rt305x/rt305x_gpio.c2
-rw-r--r--sys/mips/rt305x/rt305x_pci.c2
-rw-r--r--sys/mips/sentry5/obio.c2
-rw-r--r--sys/mips/sibyte/sb_zbbus.c2
-rw-r--r--sys/mips/sibyte/sb_zbpci.c2
-rw-r--r--sys/pc98/pc98/canbus.c9
-rw-r--r--sys/powerpc/mpc85xx/lbc.c4
-rw-r--r--sys/powerpc/ofw/ofw_pci.c12
-rw-r--r--sys/powerpc/powermac/macgpio.c5
-rw-r--r--sys/powerpc/powermac/macio.c6
-rw-r--r--sys/powerpc/powermac/uninorth.c6
-rw-r--r--sys/powerpc/psim/ata_iobus.c6
-rw-r--r--sys/powerpc/psim/iobus.c6
-rw-r--r--sys/sparc64/central/central.c6
-rw-r--r--sys/sparc64/ebus/ebus.c6
-rw-r--r--sys/sparc64/fhc/fhc.c6
-rw-r--r--sys/sparc64/isa/isa.c2
-rw-r--r--sys/sparc64/pci/apb.c8
-rw-r--r--sys/sparc64/pci/fire.c2
-rw-r--r--sys/sparc64/pci/ofw_pci.c4
-rw-r--r--sys/sparc64/pci/psycho.c2
-rw-r--r--sys/sparc64/pci/sbbc.c6
-rw-r--r--sys/sparc64/pci/schizo.c2
-rw-r--r--sys/sparc64/sbus/sbus.c4
-rw-r--r--sys/sparc64/sparc64/nexus.c4
-rw-r--r--sys/sparc64/sparc64/upa.c8
-rw-r--r--sys/sys/_types.h2
-rw-r--r--sys/sys/bus.h50
-rw-r--r--sys/sys/rman.h40
-rw-r--r--sys/sys/types.h2
-rw-r--r--sys/x86/include/legacyvar.h5
-rw-r--r--sys/x86/include/pci_cfgreg.h2
-rw-r--r--sys/x86/isa/atrtc.c2
-rw-r--r--sys/x86/isa/clock.c2
-rw-r--r--sys/x86/isa/isa.c2
-rw-r--r--sys/x86/pci/pci_bus.c8
-rw-r--r--sys/x86/pci/qpi.c2
-rw-r--r--sys/x86/x86/mptable_pci.c8
-rw-r--r--sys/x86/x86/nexus.c22
162 files changed, 538 insertions, 491 deletions
diff --git a/lib/libdevinfo/devinfo.3 b/lib/libdevinfo/devinfo.3
index ee094dd..9628a9a 100644
--- a/lib/libdevinfo/devinfo.3
+++ b/lib/libdevinfo/devinfo.3
@@ -110,8 +110,8 @@ struct devinfo_dev {
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 @@ struct devinfo_res {
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
diff --git a/lib/libdevinfo/devinfo.h b/lib/libdevinfo/devinfo.h
index b0b8cec..f946446 100644
--- a/lib/libdevinfo/devinfo.h
+++ b/lib/libdevinfo/devinfo.h
@@ -56,8 +56,8 @@ struct devinfo_dev {
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 @@ struct devinfo_res {
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 */
};
diff --git a/share/man/man9/bus_adjust_resource.9 b/share/man/man9/bus_adjust_resource.9
index b7c477a..6f561b9 100644
--- a/share/man/man9/bus_adjust_resource.9
+++ b/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.
diff --git a/share/man/man9/bus_alloc_resource.9 b/share/man/man9/bus_alloc_resource.9
index 78959a0..d579f9a 100644
--- a/share/man/man9/bus_alloc_resource.9
+++ b/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
diff --git a/share/man/man9/bus_get_resource.9 b/share/man/man9/bus_get_resource.9
index 2f6898a..33fc2e2 100644
--- a/share/man/man9/bus_get_resource.9
+++ b/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
diff --git a/share/man/man9/bus_set_resource.9 b/share/man/man9/bus_set_resource.9
index 2eb24bf..b8d8409 100644
--- a/share/man/man9/bus_set_resource.9
+++ b/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
diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9
index a14f686..6787cea 100644
--- a/share/man/man9/rman.9
+++ b/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"
diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c
index 8dce36c..97e9e25 100644
--- a/sys/arm/arm/nexus.c
+++ b/sys/arm/arm/nexus.c
@@ -82,7 +82,7 @@ static int nexus_attach(device_t);
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 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit)
*/
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;
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c
index 8b94dc6..0b0d911 100644
--- a/sys/arm/at91/at91.c
+++ b/sys/arm/at91/at91.c
@@ -147,7 +147,7 @@ at91_attach(device_t dev)
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 @@ at91_activate_resource(device_t bus, device_t child, int type, int rid,
struct resource *r)
{
#if 0
- u_long p;
+ rman_res_t p;
int error;
if (type == SYS_RES_MEMORY) {
diff --git a/sys/arm/cavium/cns11xx/econa.c b/sys/arm/cavium/cns11xx/econa.c
index b9446f0..29f0904 100644
--- a/sys/arm/cavium/cns11xx/econa.c
+++ b/sys/arm/cavium/cns11xx/econa.c
@@ -408,7 +408,7 @@ econa_attach(device_t dev)
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;
diff --git a/sys/arm/mv/mv_localbus.c b/sys/arm/mv/mv_localbus.c
index 59cccc4..cb1fbcc 100644
--- a/sys/arm/mv/mv_localbus.c
+++ b/sys/arm/mv/mv_localbus.c
@@ -100,7 +100,7 @@ static int localbus_attach(device_t);
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 @@ localbus_print_child(device_t dev, device_t child)
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;
diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c
index 05dcbbc..2dd45eb 100644
--- a/sys/arm/mv/mv_pci.c
+++ b/sys/arm/mv/mv_pci.c
@@ -332,7 +332,7 @@ static int mv_pcib_probe(device_t);
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 @@ mv_pcib_init_all_bars(struct mv_pcib_softc *sc, int bus, int slot,
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;
diff --git a/sys/arm/versatile/versatile_pci.c b/sys/arm/versatile/versatile_pci.c
index 8a5c010..0bc4926 100644
--- a/sys/arm/versatile/versatile_pci.c
+++ b/sys/arm/versatile/versatile_pci.c
@@ -305,7 +305,7 @@ versatile_pci_write_ivar(device_t dev, device_t child, int which,
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);
diff --git a/sys/arm/xscale/i8134x/i81342.c b/sys/arm/xscale/i8134x/i81342.c
index 49d658a..7a6b315 100644
--- a/sys/arm/xscale/i8134x/i81342.c
+++ b/sys/arm/xscale/i8134x/i81342.c
@@ -409,7 +409,7 @@ i81342_attach(device_t dev)
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;
diff --git a/sys/arm/xscale/i8134x/i81342_pci.c b/sys/arm/xscale/i8134x/i81342_pci.c
index d9d978c..d17fb14 100644
--- a/sys/arm/xscale/i8134x/i81342_pci.c
+++ b/sys/arm/xscale/i8134x/i81342_pci.c
@@ -328,7 +328,7 @@ i81342_pci_write_config(device_t dev, u_int bus, u_int slot, u_int func,
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 @@ static int
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) {
diff --git a/sys/arm/xscale/i8134x/obio.c b/sys/arm/xscale/i8134x/obio.c
index 5aa3c47..f61893b 100644
--- a/sys/arm/xscale/i8134x/obio.c
+++ b/sys/arm/xscale/i8134x/obio.c
@@ -91,7 +91,7 @@ obio_attach(device_t dev)
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;
diff --git a/sys/arm/xscale/ixp425/avila_ata.c b/sys/arm/xscale/ixp425/avila_ata.c
index 217cfc8..e3a9a52 100644
--- a/sys/arm/xscale/ixp425/avila_ata.c
+++ b/sys/arm/xscale/ixp425/avila_ata.c
@@ -282,7 +282,7 @@ ata_avila_intr(void *xsc)
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);
diff --git a/sys/arm/xscale/ixp425/ixp425.c b/sys/arm/xscale/ixp425/ixp425.c
index 07c491a..017d567 100644
--- a/sys/arm/xscale/ixp425/ixp425.c
+++ b/sys/arm/xscale/ixp425/ixp425.c
@@ -496,7 +496,7 @@ getvbase(uint32_t hwbase, uint32_t size, uint32_t *vbase)
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;
diff --git a/sys/arm/xscale/ixp425/ixp425_pci.c b/sys/arm/xscale/ixp425/ixp425_pci.c
index 9bda385..d987878 100644
--- a/sys/arm/xscale/ixp425/ixp425_pci.c
+++ b/sys/arm/xscale/ixp425/ixp425_pci.c
@@ -269,7 +269,7 @@ ixppcib_teardown_intr(device_t dev, device_t child, struct resource *vec,
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;
diff --git a/sys/arm/xscale/pxa/pxa_obio.c b/sys/arm/xscale/pxa/pxa_obio.c
index 8b35910..6761ca3 100644
--- a/sys/arm/xscale/pxa/pxa_obio.c
+++ b/sys/arm/xscale/pxa/pxa_obio.c
@@ -50,14 +50,14 @@ static int pxa_read_ivar(device_t, device_t, int, uintptr_t *);
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 @@ pxa_get_resource_list(device_t dev, device_t child)
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 @@ DRIVER_MODULE(pxa, nexus, pxa_driver, pxa_devclass, 0, 0);
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;
diff --git a/sys/arm/xscale/pxa/pxa_smi.c b/sys/arm/xscale/pxa/pxa_smi.c
index f25dac7..4c49e75 100644
--- a/sys/arm/xscale/pxa/pxa_smi.c
+++ b/sys/arm/xscale/pxa/pxa_smi.c
@@ -70,7 +70,7 @@ static int pxa_smi_print_child(device_t, device_t);
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 @@ pxa_smi_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
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;
diff --git a/sys/arm64/arm64/gic_v3_fdt.c b/sys/arm64/arm64/gic_v3_fdt.c
index 79075f2..6c8de49 100644
--- a/sys/arm64/arm64/gic_v3_fdt.c
+++ b/sys/arm64/arm64/gic_v3_fdt.c
@@ -54,7 +54,7 @@ static int gic_v3_fdt_probe(device_t);
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 @@ gic_v3_ofw_get_devinfo(device_t bus __unused, device_t child)
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;
diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c
index ec1fe84..8290cff 100644
--- a/sys/arm64/arm64/nexus.c
+++ b/sys/arm64/arm64/nexus.c
@@ -99,13 +99,14 @@ static device_attach_t nexus_acpi_attach;
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 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit)
*/
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 @@ nexus_get_reslist(device_t dev, device_t child)
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;
diff --git a/sys/arm64/cavium/thunder_pcie.c b/sys/arm64/cavium/thunder_pcie.c
index 20aab1e..9785739 100644
--- a/sys/arm64/cavium/thunder_pcie.c
+++ b/sys/arm64/cavium/thunder_pcie.c
@@ -110,7 +110,7 @@ SYSCTL_INT(_hw, OID_AUTO, thunder_pcie_max_vfs, CTLFLAG_RWTUN,
/* 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 @@ thunder_pcie_release_resource(device_t dev, device_t child, int type, int rid,
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 @@ static int
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);
diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c
index e5007ac..e4406c3 100644
--- a/sys/arm64/cavium/thunder_pcie_pem.c
+++ b/sys/arm64/cavium/thunder_pcie_pem.c
@@ -126,7 +126,7 @@ struct thunder_pem_softc {
};
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 @@ static int
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 @@ thunder_pem_write_config(device_t dev, u_int bus, u_int slot,
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;
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 0593235..686bbc8 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -121,12 +121,12 @@ static struct resource_list *acpi_get_rlist(device_t dev, device_t child);
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 @@ acpi_reserve_resources(device_t dev)
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 @@ acpi_set_resource(device_t dev, device_t child, int type, int rid,
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 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid,
* 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 @@ acpi_is_resource_managed(int type, struct resource *r)
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))
diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c
index 0da8bae..1b5a161 100644
--- a/sys/dev/acpica/acpi_hpet.c
+++ b/sys/dev/acpica/acpi_hpet.c
@@ -322,7 +322,7 @@ hpet_find(ACPI_HANDLE handle, UINT32 level, void *context,
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++) {
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index 490f277..ef90954 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -91,12 +91,12 @@ static int acpi_pcib_alloc_msix(device_t pcib, device_t dev,
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 @@ acpi_pcib_producer_handler(ACPI_RESOURCE *res, void *context)
#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 @@ acpi_pcib_acpi_attach(device_t dev)
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 @@ acpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr,
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 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid,
#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;
diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c
index f8936a5..078ecce 100644
--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -671,7 +671,7 @@ acpi_sysres_attach(device_t dev)
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
diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c
index 296e38f..2cdf908 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -122,7 +122,7 @@ static void
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__);
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index cbd4bd9..4f601c9 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -383,7 +383,8 @@ ACPI_STATUS acpi_lookup_irq_resource(device_t dev, int rid,
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);
diff --git a/sys/dev/advansys/adv_isa.c b/sys/dev/advansys/adv_isa.c
index 8afa05d..00381a3 100644
--- a/sys/dev/advansys/adv_isa.c
+++ b/sys/dev/advansys/adv_isa.c
@@ -109,7 +109,7 @@ adv_isa_probe(device_t dev)
{
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;
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index 7fe3da8..25ebbf7 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -523,7 +523,7 @@ ahci_intr_one_edge(void *data)
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;
diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h
index 5953425..86bdf2b 100644
--- a/sys/dev/ahci/ahci.h
+++ b/sys/dev/ahci/ahci.h
@@ -626,7 +626,7 @@ int ahci_detach(device_t dev);
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,
diff --git a/sys/dev/ata/ata-cbus.c b/sys/dev/ata/ata-cbus.c
index 489391d..793601d 100644
--- a/sys/dev/ata/ata-cbus.c
+++ b/sys/dev/ata/ata-cbus.c
@@ -67,7 +67,7 @@ ata_cbus_probe(device_t dev)
{
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 @@ ata_cbus_attach(device_t dev)
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);
diff --git a/sys/dev/ata/ata-isa.c b/sys/dev/ata/ata-isa.c
index c94d262..43b8533 100644
--- a/sys/dev/ata/ata-isa.c
+++ b/sys/dev/ata/ata-isa.c
@@ -60,7 +60,7 @@ static int
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 @@ ata_isa_attach(device_t dev)
{
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)
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 00ad6c7..74df044 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -217,7 +217,8 @@ ata_pci_write_config(device_t dev, device_t child, int reg,
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;
diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h
index 7872e95..101d6c6 100644
--- a/sys/dev/ata/ata-pci.h
+++ b/sys/dev/ata/ata-pci.h
@@ -535,7 +535,7 @@ void ata_pci_write_config(device_t dev, device_t child, int reg,
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);
diff --git a/sys/dev/atkbdc/atkbdc_ebus.c b/sys/dev/atkbdc/atkbdc_ebus.c
index 0dcb0a7..fd6443e 100644
--- a/sys/dev/atkbdc/atkbdc_ebus.c
+++ b/sys/dev/atkbdc/atkbdc_ebus.c
@@ -91,7 +91,7 @@ static int
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_ebus_attach(device_t dev)
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;
diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c
index c55e356..2f863fc 100644
--- a/sys/dev/atkbdc/atkbdc_isa.c
+++ b/sys/dev/atkbdc/atkbdc_isa.c
@@ -50,8 +50,8 @@ static int atkbdc_isa_attach(device_t dev);
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 @@ atkbdc_isa_probe(device_t dev)
{
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 @@ atkbdc_isa_add_child(device_t bus, u_int order, const char *name, int unit)
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;
diff --git a/sys/dev/atkbdc/atkbdc_subr.c b/sys/dev/atkbdc/atkbdc_subr.c
index b97b592..28730c6 100644
--- a/sys/dev/atkbdc/atkbdc_subr.c
+++ b/sys/dev/atkbdc/atkbdc_subr.c
@@ -51,7 +51,7 @@ int
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;
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c
index a9b0d08..770efe8 100644
--- a/sys/dev/cs/if_cs.c
+++ b/sys/dev/cs/if_cs.c
@@ -258,7 +258,7 @@ cs_cs89x0_probe(device_t dev)
{
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;
diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c
index e7b8927..da8d32c 100644
--- a/sys/dev/ctau/if_ct.c
+++ b/sys/dev/ctau/if_ct.c
@@ -317,8 +317,8 @@ static short porttab [] = {
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 int ct_is_free_res (device_t dev, int rid, int type, u_long start,
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 void ct_identify (driver_t *driver, device_t dev)
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 @@ ct_bus_dma_mem_free (ct_dma_mem_t *dmem)
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;
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c
index cac69ab..d513161 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -405,8 +405,8 @@ static short porttab [] = {
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 int cx_is_free_res (device_t dev, int rid, int type, u_long start,
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 @@ static int cx_probe (device_t dev)
{
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 @@ cx_bus_dma_mem_free (cx_dma_mem_t *dmem)
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;
diff --git a/sys/dev/ed/if_ed_3c503.c b/sys/dev/ed/if_ed_3c503.c
index d7ab2f2..353fbbf 100644
--- a/sys/dev/ed/if_ed_3c503.c
+++ b/sys/dev/ed/if_ed_3c503.c
@@ -74,7 +74,7 @@ ed_probe_3Com(device_t dev, int port_rid, int flags)
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)
diff --git a/sys/dev/ed/if_ed_cbus.c b/sys/dev/ed/if_ed_cbus.c
index c3660a7..f9672ac 100644
--- a/sys/dev/ed/if_ed_cbus.c
+++ b/sys/dev/ed/if_ed_cbus.c
@@ -607,7 +607,7 @@ ed98_alloc_memory(dev, rid)
{
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 @@ ed_probe_CNET98(device_t dev, int port_rid, int flags)
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 @@ ed_probe_CNET98EL(device_t dev, int port_rid, int flags)
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 @@ ed_probe_NEC77(device_t dev, int port_rid, int flags)
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 @@ ed_probe_NW98X(device_t dev, int port_rid, int flags)
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 @@ ed_probe_SB98(device_t dev, int port_rid, int flags)
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)
diff --git a/sys/dev/ed/if_ed_hpp.c b/sys/dev/ed/if_ed_hpp.c
index f16cd01..ec5c8db 100644
--- a/sys/dev/ed/if_ed_hpp.c
+++ b/sys/dev/ed/if_ed_hpp.c
@@ -126,7 +126,7 @@ ed_probe_HP_pclanp(device_t dev, int port_rid, int flags)
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)
diff --git a/sys/dev/ed/if_ed_wd80x3.c b/sys/dev/ed/if_ed_wd80x3.c
index 4ff2286..ccaa46e 100644
--- a/sys/dev/ed/if_ed_wd80x3.c
+++ b/sys/dev/ed/if_ed_wd80x3.c
@@ -97,7 +97,7 @@ ed_probe_WD80x3_generic(device_t dev, int flags, uint16_t *intr_vals[])
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;
diff --git a/sys/dev/eisa/eisaconf.c b/sys/dev/eisa/eisaconf.c
index 8ec3419..ada1846 100644
--- a/sys/dev/eisa/eisaconf.c
+++ b/sys/dev/eisa/eisaconf.c
@@ -352,7 +352,7 @@ eisa_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
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);
diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c
index 4e5bdd2..42096d2 100644
--- a/sys/dev/fdt/simplebus.c
+++ b/sys/dev/fdt/simplebus.c
@@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
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 @@ simplebus_get_resource_list(device_t bus __unused, device_t child)
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;
diff --git a/sys/dev/fe/if_fe_cbus.c b/sys/dev/fe/if_fe_cbus.c
index dc10952..c083cdd 100644
--- a/sys/dev/fe/if_fe_cbus.c
+++ b/sys/dev/fe/if_fe_cbus.c
@@ -298,7 +298,7 @@ fe_probe_re1000(device_t dev)
{
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 @@ fe_probe_jli(device_t dev)
{
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 @@ static int
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 @@ static int
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 @@ 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 [] = {
@@ -804,7 +804,7 @@ fe_probe_ubn(device_t dev)
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 @@ fe_probe_rex(device_t dev)
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 [] = {
diff --git a/sys/dev/fe/if_fe_isa.c b/sys/dev/fe/if_fe_isa.c
index 53046e9..8dc7cba 100644
--- a/sys/dev/fe/if_fe_isa.c
+++ b/sys/dev/fe/if_fe_isa.c
@@ -203,7 +203,7 @@ fe_probe_fmv(device_t dev)
{
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 @@ fe_probe_jli(device_t dev)
{
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 @@ static int
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 @@ static int
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 @@ static int
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 @@ static int
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
diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c
index 4a7994e..e3755de 100644
--- a/sys/dev/gpio/gpiobus.c
+++ b/sys/dev/gpio/gpiobus.c
@@ -488,7 +488,7 @@ gpiobus_hinted_child(device_t bus, const char *dname, int dunit)
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 @@ gpiobus_set_resource(device_t dev, device_t child, int type, int rid,
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;
diff --git a/sys/dev/mca/mca_bus.c b/sys/dev/mca/mca_bus.c
index 2b4a0b5..f97fd24 100644
--- a/sys/dev/mca/mca_bus.c
+++ b/sys/dev/mca/mca_bus.c
@@ -456,7 +456,7 @@ mca_read_ivar (device_t dev, device_t child, int which, uintptr_t * result)
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;
diff --git a/sys/dev/mvs/mvs_pci.c b/sys/dev/mvs/mvs_pci.c
index 11c1dd3..316ac00 100644
--- a/sys/dev/mvs/mvs_pci.c
+++ b/sys/dev/mvs/mvs_pci.c
@@ -389,7 +389,8 @@ mvs_intr(void *data)
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;
diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c
index 8ed7df4..d4ecd8f 100644
--- a/sys/dev/mvs/mvs_soc.c
+++ b/sys/dev/mvs/mvs_soc.c
@@ -336,7 +336,7 @@ mvs_intr(void *data)
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;
diff --git a/sys/dev/ncv/ncr53c500_pccard.c b/sys/dev/ncv/ncr53c500_pccard.c
index a7a2b5b..55f0ef9 100644
--- a/sys/dev/ncv/ncr53c500_pccard.c
+++ b/sys/dev/ncv/ncr53c500_pccard.c
@@ -142,7 +142,7 @@ ncv_alloc_resource(device_t dev)
{
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;
diff --git a/sys/dev/nsp/nsp_pccard.c b/sys/dev/nsp/nsp_pccard.c
index aed82af..75fc076 100644
--- a/sys/dev/nsp/nsp_pccard.c
+++ b/sys/dev/nsp/nsp_pccard.c
@@ -115,7 +115,7 @@ static int
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);
diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c
index 670abff..142ee1a 100644
--- a/sys/dev/ofw/ofwbus.c
+++ b/sys/dev/ofw/ofwbus.c
@@ -178,7 +178,7 @@ ofwbus_attach(device_t dev)
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 @@ ofwbus_alloc_resource(device_t bus, device_t child, int type, int *rid,
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;
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index 87ab53a..b3c2e32 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -97,9 +97,9 @@ static void pccard_print_resources(struct resource_list *rl,
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 @@ static int pccard_read_ivar(device_t bus, device_t child, int which,
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 @@ pccard_function_init(struct pccard_function *pf, int entry)
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 @@ pccard_function_free(struct pccard_function *pf)
}
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 @@ 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)
+ 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 @@ pccard_set_resource(device_t dev, device_t child, int type, int rid,
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 @@ 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)
+ 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;
diff --git a/sys/dev/pccard/pccardvarp.h b/sys/dev/pccard/pccardvarp.h
index 54d7f75..9478c8f 100644
--- a/sys/dev/pccard/pccardvarp.h
+++ b/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 {
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index c5cf16d..9398771 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -166,8 +166,8 @@ static int cbb_cardbus_activate_resource(device_t brdev, device_t child,
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 @@ cbb_cardbus_deactivate_resource(device_t brdev, device_t child, int type,
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 @@ cbb_pcic_deactivate_resource(device_t brdev, device_t child, int type,
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 @@ cbb_deactivate_resource(device_t brdev, device_t child, int type,
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);
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index a82afa2..e739027 100644
--- a/sys/dev/pccbb/pccbb_pci.c
+++ b/sys/dev/pccbb/pccbb_pci.c
@@ -783,7 +783,7 @@ cbb_pci_filt(void *arg)
#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 @@ cbb_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
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;
diff --git a/sys/dev/pccbb/pccbbvar.h b/sys/dev/pccbb/pccbbvar.h
index f19b933..196f154 100644
--- a/sys/dev/pccbb/pccbbvar.h
+++ b/sys/dev/pccbb/pccbbvar.h
@@ -113,7 +113,7 @@ extern devclass_t cbb_devclass;
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);
diff --git a/sys/dev/pcf/pcf_isa.c b/sys/dev/pcf/pcf_isa.c
index e811635..70c3efe 100644
--- a/sys/dev/pcf/pcf_isa.c
+++ b/sys/dev/pcf/pcf_isa.c
@@ -100,7 +100,7 @@ pcf_isa_identify(driver_t *driver, device_t parent)
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 */
diff --git a/sys/dev/pci/hostb_pci.c b/sys/dev/pci/hostb_pci.c
index 4e28691..84878ca 100644
--- a/sys/dev/pci/hostb_pci.c
+++ b/sys/dev/pci/hostb_pci.c
@@ -102,7 +102,7 @@ pci_hostb_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
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));
diff --git a/sys/dev/pci/isa_pci.c b/sys/dev/pci/isa_pci.c
index 7819b7e..950920d 100644
--- a/sys/dev/pci/isa_pci.c
+++ b/sys/dev/pci/isa_pci.c
@@ -52,8 +52,8 @@ __FBSDID("$FreeBSD$");
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 @@ 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)
+ rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
{
struct isab_pci_softc *sc;
int bar;
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 261aa0c..81caa48 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -3353,7 +3353,7 @@ pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg,
{
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 @@ clear:
}
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 @@ DB_SHOW_COMMAND(pciregs, db_pci_dump)
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 @@ out:
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 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int *rid,
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;
diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c
index e4260e0..d6d2125 100644
--- a/sys/dev/pci/pci_host_generic.c
+++ b/sys/dev/pci/pci_host_generic.c
@@ -124,8 +124,8 @@ static int generic_pcie_read_ivar(device_t dev, device_t child, int index,
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 @@ generic_pcie_release_resource(device_t dev, device_t child, int type,
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 @@ fail:
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;
diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c
index 58e6926..85ddc31 100644
--- a/sys/dev/pci/pci_iov.c
+++ b/sys/dev/pci/pci_iov.c
@@ -320,7 +320,7 @@ pci_iov_alloc_bar(struct pci_devinfo *dinfo, int bar, pci_addr_t bar_shift)
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 @@ pci_iov_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
}
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;
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index f5a5b74..a6c6931 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -212,9 +212,10 @@ pcib_write_windows(struct pcib_softc *sc, int mask)
* 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 @@ pcib_add_window_resources(struct pcib_window *w, struct resource **res,
}
}
-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 @@ pcib_walk_nonisa_ranges(u_long start, u_long end, nonisa_callback *cb,
}
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 @@ struct alloc_state {
};
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 @@ alloc_ranges(u_long start, u_long end, void *arg)
}
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 @@ pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, int min_count)
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 @@ pcib_suballoc_bus(struct pcib_secbus *bus, device_t child, int *rid,
* 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 @@ pcib_grow_subbus(struct pcib_secbus *bus, u_long new_end)
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 @@ pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
*/
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 @@ pcib_suballoc_resource(struct pcib_softc *sc, struct pcib_window *w,
/* 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 @@ pcib_alloc_new_window(struct pcib_softc *sc, struct pcib_window *w, int type,
/* 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 @@ pcib_expand_window(struct pcib_softc *sc, struct pcib_window *w, int type,
*/
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 @@ updatewin:
*/
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 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
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 @@ pcib_release_resource(device_t dev, device_t child, int type, int rid,
*/
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;
diff --git a/sys/dev/pci/pci_private.h b/sys/dev/pci/pci_private.h
index 7795747..a49435e 100644
--- a/sys/dev/pci/pci_private.h
+++ b/sys/dev/pci/pci_private.h
@@ -105,8 +105,8 @@ int pci_msix_count_method(device_t dev, device_t child);
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 @@ struct pci_map *pci_add_bar(device_t dev, int reg, pci_addr_t value,
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 @@ device_t pci_create_iov_child_method(device_t bus, device_t pf,
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_ */
diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c
index 03bcdc0..77c60c3 100644
--- a/sys/dev/pci/pci_subr.c
+++ b/sys/dev/pci/pci_subr.c
@@ -178,8 +178,8 @@ 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)
+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 @@ pcib_host_res_decodes(struct pcib_host_resources *hr, int type, u_long start,
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 @@ restart:
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 @@ pci_find_domain(int domain)
}
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 @@ pci_domain_alloc_bus(int domain, device_t dev, int *rid, u_long start,
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;
diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h
index bba4ce2..417c107 100644
--- a/sys/dev/pci/pcib_private.h
+++ b/sys/dev/pci/pcib_private.h
@@ -49,13 +49,13 @@ int pcib_host_res_init(device_t pcib,
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 host_pcib_get_busno(pci_read_config_fn read_config, int bus,
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 @@ const char *pcib_child_name(device_t child);
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
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index d8df42f..7c14035 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -397,7 +397,7 @@ pci_get_vpd_readonly(device_t dev, const char *kw, const char **vptr)
* 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 @@ pci_is_vga_ioport_range(u_long start, u_long end)
}
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);
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 0c49ca0..048bc91 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -68,7 +68,8 @@ SYSCTL_DECL(_hw_pci);
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 @@ 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)
+ rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
{
struct vga_resource *vr;
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c
index e1edc4d..17a4a04 100644
--- a/sys/dev/ppc/ppc.c
+++ b/sys/dev/ppc/ppc.c
@@ -1674,7 +1674,7 @@ ppc_probe(device_t dev, int rid)
#endif
struct ppc_data *ppc;
int error;
- u_long port;
+ rman_res_t port;
/*
* Allocate the ppc_data structure.
@@ -2015,7 +2015,7 @@ ppc_write_ivar(device_t bus, device_t dev, int index, uintptr_t val)
*/
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);
diff --git a/sys/dev/ppc/ppcvar.h b/sys/dev/ppc/ppcvar.h
index faff75a..792111e 100644
--- a/sys/dev/ppc/ppcvar.h
+++ b/sys/dev/ppc/ppcvar.h
@@ -41,7 +41,7 @@ u_char ppc_io(device_t, int, u_char *, int, u_char);
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);
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c
index 2b320ca..75736d1 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -78,7 +78,7 @@ puc_get_bar(struct puc_softc *sc, int rid)
{
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 @@ puc_bfe_probe(device_t dev, const struct puc_cfg *cfg)
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 @@ puc_bus_release_resource(device_t dev, device_t child, int type, int rid,
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)
diff --git a/sys/dev/puc/puc_bfe.h b/sys/dev/puc/puc_bfe.h
index 9f2f3fb..912958b 100644
--- a/sys/dev/puc/puc_bfe.h
+++ b/sys/dev/puc/puc_bfe.h
@@ -85,9 +85,9 @@ int puc_bfe_probe(device_t, const struct puc_cfg *);
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 *);
diff --git a/sys/dev/quicc/quicc_bfe.h b/sys/dev/quicc/quicc_bfe.h
index 5c58914..a08e4cf 100644
--- a/sys/dev/quicc/quicc_bfe.h
+++ b/sys/dev/quicc/quicc_bfe.h
@@ -61,8 +61,9 @@ int quicc_bfe_detach(device_t);
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,
diff --git a/sys/dev/quicc/quicc_core.c b/sys/dev/quicc/quicc_core.c
index 532bb8e..16525d6 100644
--- a/sys/dev/quicc/quicc_core.c
+++ b/sys/dev/quicc/quicc_core.c
@@ -101,7 +101,7 @@ quicc_bfe_attach(device_t dev)
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 @@ quicc_bfe_probe(device_t dev, u_int clock)
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 @@ quicc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid,
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;
diff --git a/sys/dev/scc/scc_bfe.h b/sys/dev/scc/scc_bfe.h
index 33acdc5..be52707 100644
--- a/sys/dev/scc/scc_bfe.h
+++ b/sys/dev/scc/scc_bfe.h
@@ -143,8 +143,8 @@ int scc_bfe_detach(device_t dev);
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,
diff --git a/sys/dev/scc/scc_core.c b/sys/dev/scc/scc_core.c
index 7c96426..6b0558a 100644
--- a/sys/dev/scc/scc_core.c
+++ b/sys/dev/scc/scc_core.c
@@ -103,7 +103,7 @@ scc_bfe_attach(device_t dev, u_int ipc)
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 @@ scc_bfe_probe(device_t dev, u_int regshft, u_int rclk, u_int rid)
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 @@ scc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid,
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;
diff --git a/sys/dev/siba/siba.c b/sys/dev/siba/siba.c
index ebe7190..8c3898c 100644
--- a/sys/dev/siba/siba.c
+++ b/sys/dev/siba/siba.c
@@ -92,8 +92,8 @@ static int siba_activate_resource(device_t, device_t, int, int,
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 @@ siba_print_child(device_t bus, device_t child)
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;
diff --git a/sys/dev/siba/siba_bwn.c b/sys/dev/siba/siba_bwn.c
index 2cd3d4a..3cb784e 100644
--- a/sys/dev/siba/siba_bwn.c
+++ b/sys/dev/siba/siba_bwn.c
@@ -242,7 +242,7 @@ siba_bwn_resume(device_t dev)
/* 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,
diff --git a/sys/dev/siba/siba_pcib.c b/sys/dev/siba/siba_pcib.c
index 6236aed..cd755c0 100644
--- a/sys/dev/siba/siba_pcib.c
+++ b/sys/dev/siba/siba_pcib.c
@@ -92,7 +92,7 @@ static int siba_pcib_activate_resource(device_t, device_t, int,
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 @@ siba_pcib_teardown_intr(device_t dev, device_t child, struct resource *vec,
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
diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c
index 301b9e9..9ceb444 100644
--- a/sys/dev/siis/siis.c
+++ b/sys/dev/siis/siis.c
@@ -314,7 +314,7 @@ siis_intr(void *data)
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;
diff --git a/sys/dev/snc/if_snc_cbus.c b/sys/dev/snc/if_snc_cbus.c
index c3c7946..eea0250 100644
--- a/sys/dev/snc/if_snc_cbus.c
+++ b/sys/dev/snc/if_snc_cbus.c
@@ -72,7 +72,7 @@ snc_isapnp_reconfig(device_t dev)
{
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));
diff --git a/sys/dev/sound/isa/gusc.c b/sys/dev/sound/isa/gusc.c
index a45e7e6..d6fd90f 100644
--- a/sys/dev/sound/isa/gusc.c
+++ b/sys/dev/sound/isa/gusc.c
@@ -91,7 +91,7 @@ static int gusc_attach(device_t dev);
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 @@ gusc_intr(void *arg)
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;
diff --git a/sys/dev/sound/isa/sbc.c b/sys/dev/sound/isa/sbc.c
index 6f8f64e..3a32365 100644
--- a/sys/dev/sound/isa/sbc.c
+++ b/sys/dev/sound/isa/sbc.c
@@ -80,7 +80,7 @@ static int sbc_attach(device_t dev);
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 @@ sbc_teardown_intr(device_t dev, device_t child, struct resource *irq,
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;
diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c
index e406410..5dbc7be 100644
--- a/sys/dev/sound/pci/csa.c
+++ b/sys/dev/sound/pci/csa.c
@@ -81,7 +81,8 @@ typedef struct csa_softc *sc_p;
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 @@ csa_resume(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)
{
sc_p scp;
csa_res *resp;
diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c
index 969d532..82b1d77 100644
--- a/sys/dev/sound/pci/fm801.c
+++ b/sys/dev/sound/pci/fm801.c
@@ -716,7 +716,8 @@ fm801_pci_probe( device_t dev )
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;
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c
index f0cb57f..2c74536 100644
--- a/sys/dev/sound/pci/vibes.c
+++ b/sys/dev/sound/pci/vibes.c
@@ -721,9 +721,10 @@ sv_probe(device_t dev)
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;
diff --git a/sys/dev/stg/tmc18c30_subr.c b/sys/dev/stg/tmc18c30_subr.c
index 8c686d6..98cf1b4 100644
--- a/sys/dev/stg/tmc18c30_subr.c
+++ b/sys/dev/stg/tmc18c30_subr.c
@@ -65,7 +65,7 @@ int
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);
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c
index 23835c6..b3b92d6 100644
--- a/sys/dev/wl/if_wl.c
+++ b/sys/dev/wl/if_wl.c
@@ -388,7 +388,7 @@ wlprobe(device_t device)
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);
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c
index 9e10320..7c11459 100644
--- a/sys/isa/isa_common.c
+++ b/sys/isa/isa_common.c
@@ -928,7 +928,7 @@ isa_driver_added(device_t dev, driver_t *driver)
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;
diff --git a/sys/isa/isa_common.h b/sys/isa/isa_common.h
index a6702f4..977e222 100644
--- a/sys/isa/isa_common.h
+++ b/sys/isa/isa_common.h
@@ -69,7 +69,8 @@ struct isa_device {
*/
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);
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m
index bafa448..e55b1ce 100644
--- a/sys/kern/bus_if.m
+++ b/sys/kern/bus_if.m
@@ -44,8 +44,8 @@ INTERFACE bus;
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 @@ METHOD struct resource * alloc_resource {
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 @@ METHOD int adjust_resource {
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 @@ METHOD int set_resource {
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 @@ METHOD int get_resource {
device_t _child;
int _type;
int _rid;
- u_long *_startp;
- u_long *_countp;
+ rman_res_t *_startp;
+ rman_res_t *_countp;
};
/**
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index b1159b6..6aca991 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -3063,8 +3063,8 @@ resource_list_free(struct resource_list *rl)
* @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 @@ resource_list_add_next(struct resource_list *rl, int type, u_long start,
*/
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 @@ resource_list_delete(struct resource_list *rl, int type, int rid)
*/
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 @@ resource_list_reserve(struct resource_list *rl, device_t bus, device_t child,
*/
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 @@ bus_generic_teardown_intr(device_t dev, device_t child, struct resource *irq,
*/
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 @@ bus_generic_adjust_resource(device_t dev, device_t child, int type,
*/
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 @@ bus_generic_get_dma_tag(device_t dev, device_t child)
*/
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 @@ bus_generic_rl_get_resource(device_t dev, device_t child, int type, int rid,
*/
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 @@ bus_generic_rl_release_resource(device_t dev, device_t child, int type,
*/
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 @@ bus_release_resources(device_t dev, const struct resource_spec *rs,
* 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 @@ bus_alloc_resource(device_t dev, int type, int *rid, u_long start, u_long end,
* 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 @@ bus_describe_intr(device_t dev, struct resource *irq, void *cookie,
*/
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 @@ bus_set_resource(device_t dev, int type, int rid,
*/
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 @@ bus_get_resource(device_t dev, int type, int rid,
* 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 @@ bus_get_resource_start(device_t dev, int type, int rid)
* 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,
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c
index 310bd5e..3050e44 100644
--- a/sys/kern/subr_rman.c
+++ b/sys/kern/subr_rman.c
@@ -90,8 +90,8 @@ struct resource_i {
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 @@ rman_init(struct rman *rm)
}
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 @@ rman_fini(struct rman *rm)
}
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 @@ rman_first_free_region(struct rman *rm, u_long *start, u_long *end)
}
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 @@ rman_last_free_region(struct rman *rm, u_long *start, u_long *end)
/* 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 @@ rman_adjust_resource(struct resource *rr, u_long start, u_long end)
#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 @@ out:
}
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 @@ rman_make_alignment_flags(uint32_t size)
}
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 @@ rman_get_start(struct resource *r)
}
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)
{
diff --git a/sys/mips/adm5120/admpci.c b/sys/mips/adm5120/admpci.c
index e8a14a1..9b36d37 100644
--- a/sys/mips/adm5120/admpci.c
+++ b/sys/mips/adm5120/admpci.c
@@ -356,7 +356,7 @@ admpci_write_ivar(device_t dev, device_t child, int which, uintptr_t result)
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);
diff --git a/sys/mips/adm5120/obio.c b/sys/mips/adm5120/obio.c
index 788e3a8..46c09b7 100644
--- a/sys/mips/adm5120/obio.c
+++ b/sys/mips/adm5120/obio.c
@@ -103,8 +103,8 @@ static int obio_activate_resource(device_t, device_t, int, int,
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 @@ obio_attach(device_t dev)
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);
diff --git a/sys/mips/alchemy/obio.c b/sys/mips/alchemy/obio.c
index da05bbb..3c0fecb 100644
--- a/sys/mips/alchemy/obio.c
+++ b/sys/mips/alchemy/obio.c
@@ -103,8 +103,8 @@ static int obio_activate_resource(device_t, device_t, int, int,
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 @@ obio_attach(device_t dev)
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);
diff --git a/sys/mips/atheros/apb.c b/sys/mips/atheros/apb.c
index adc3756..c072567 100644
--- a/sys/mips/atheros/apb.c
+++ b/sys/mips/atheros/apb.c
@@ -63,8 +63,8 @@ static int apb_activate_resource(device_t, device_t, int, int,
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 @@ apb_attach(device_t dev)
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);
diff --git a/sys/mips/atheros/ar71xx_pci.c b/sys/mips/atheros/ar71xx_pci.c
index f745949..183f884 100644
--- a/sys/mips/atheros/ar71xx_pci.c
+++ b/sys/mips/atheros/ar71xx_pci.c
@@ -500,7 +500,7 @@ ar71xx_pci_write_ivar(device_t dev, device_t child, int which,
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);
diff --git a/sys/mips/atheros/ar724x_pci.c b/sys/mips/atheros/ar724x_pci.c
index ad8ec09..3b01801 100644
--- a/sys/mips/atheros/ar724x_pci.c
+++ b/sys/mips/atheros/ar724x_pci.c
@@ -465,7 +465,7 @@ ar724x_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t result)
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;
diff --git a/sys/mips/atheros/qca955x_pci.c b/sys/mips/atheros/qca955x_pci.c
index 0d78c1e..626ca37 100644
--- a/sys/mips/atheros/qca955x_pci.c
+++ b/sys/mips/atheros/qca955x_pci.c
@@ -398,7 +398,7 @@ qca955x_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t result
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;
diff --git a/sys/mips/beri/beri_simplebus.c b/sys/mips/beri/beri_simplebus.c
index 54f654a..31771a5 100644
--- a/sys/mips/beri/beri_simplebus.c
+++ b/sys/mips/beri/beri_simplebus.c
@@ -85,7 +85,7 @@ static int simplebus_teardown_intr(device_t, device_t, struct resource *,
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 @@ simplebus_print_child(device_t dev, device_t child)
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;
diff --git a/sys/mips/cavium/ciu.c b/sys/mips/cavium/ciu.c
index 4e069f9..b4726c5 100644
--- a/sys/mips/cavium/ciu.c
+++ b/sys/mips/cavium/ciu.c
@@ -75,7 +75,8 @@ static struct intr_event *ciu_en1_intr_events[CIU_IRQ_EN1_COUNT];
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 @@ ciu_attach(device_t dev)
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;
diff --git a/sys/mips/cavium/obio.c b/sys/mips/cavium/obio.c
index f3b3bbb..82e5c36 100644
--- a/sys/mips/cavium/obio.c
+++ b/sys/mips/cavium/obio.c
@@ -119,7 +119,7 @@ obio_attach(device_t dev)
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;
diff --git a/sys/mips/cavium/octopci.c b/sys/mips/cavium/octopci.c
index f6d73bd..17a6342 100644
--- a/sys/mips/cavium/octopci.c
+++ b/sys/mips/cavium/octopci.c
@@ -86,7 +86,8 @@ static int octopci_attach(device_t);
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 @@ octopci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
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;
diff --git a/sys/mips/idt/idtpci.c b/sys/mips/idt/idtpci.c
index d962e68..46c276a 100644
--- a/sys/mips/idt/idtpci.c
+++ b/sys/mips/idt/idtpci.c
@@ -465,7 +465,7 @@ idtpci_write_ivar(device_t dev, device_t child, int which, uintptr_t result)
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);
diff --git a/sys/mips/idt/obio.c b/sys/mips/idt/obio.c
index b7b917d..c8b4fef 100644
--- a/sys/mips/idt/obio.c
+++ b/sys/mips/idt/obio.c
@@ -59,8 +59,8 @@ static int obio_activate_resource(device_t, device_t, int, int,
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 @@ obio_attach(device_t dev)
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);
diff --git a/sys/mips/malta/gt.c b/sys/mips/malta/gt.c
index b9cff7d..8874643 100644
--- a/sys/mips/malta/gt.c
+++ b/sys/mips/malta/gt.c
@@ -76,7 +76,7 @@ gt_attach(device_t dev)
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));
diff --git a/sys/mips/malta/gt_pci.c b/sys/mips/malta/gt_pci.c
index add9c07..5262e66 100644
--- a/sys/mips/malta/gt_pci.c
+++ b/sys/mips/malta/gt_pci.c
@@ -150,7 +150,7 @@ static void gt_pci_write_config(device_t, u_int, u_int, u_int, u_int,
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 @@ gt_write_ivar(device_t dev, device_t child, int which, uintptr_t result)
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;
diff --git a/sys/mips/malta/obio.c b/sys/mips/malta/obio.c
index 2195837..64ac9c7 100644
--- a/sys/mips/malta/obio.c
+++ b/sys/mips/malta/obio.c
@@ -111,7 +111,7 @@ obio_attach(device_t dev)
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;
diff --git a/sys/mips/mips/cpu.c b/sys/mips/mips/cpu.c
index 5abd5b6..60fe134 100644
--- a/sys/mips/mips/cpu.c
+++ b/sys/mips/mips/cpu.c
@@ -400,7 +400,8 @@ static devclass_t cpu_devclass;
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 @@ cpu_attach(device_t dev)
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;
diff --git a/sys/mips/mips/nexus.c b/sys/mips/mips/nexus.c
index 06c0317..d2ee6af 100644
--- a/sys/mips/mips/nexus.c
+++ b/sys/mips/mips/nexus.c
@@ -81,22 +81,22 @@ static struct rman irq_rman;
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 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit)
*/
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 @@ nexus_get_reslist(device_t dev, device_t child)
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 @@ nexus_set_resource(device_t dev, device_t child, int type, int rid,
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;
diff --git a/sys/mips/nlm/xlp_simplebus.c b/sys/mips/nlm/xlp_simplebus.c
index 5b5eca0..7d2f697 100644
--- a/sys/mips/nlm/xlp_simplebus.c
+++ b/sys/mips/nlm/xlp_simplebus.c
@@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$");
*/
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 @@ xlp_simplebus_probe(device_t dev)
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;
diff --git a/sys/mips/rmi/iodi.c b/sys/mips/rmi/iodi.c
index 2831834..c9c5c45 100644
--- a/sys/mips/rmi/iodi.c
+++ b/sys/mips/rmi/iodi.c
@@ -67,7 +67,7 @@ extern bus_space_tag_t uart_bus_space_mem;
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 @@ iodi_setup_intr(device_t dev, device_t child,
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);
diff --git a/sys/mips/rmi/xlr_pci.c b/sys/mips/rmi/xlr_pci.c
index b41a558..c9d0b35 100644
--- a/sys/mips/rmi/xlr_pci.c
+++ b/sys/mips/rmi/xlr_pci.c
@@ -516,7 +516,7 @@ mips_platform_pci_teardown_intr(device_t dev, device_t child,
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;
diff --git a/sys/mips/rt305x/obio.c b/sys/mips/rt305x/obio.c
index ff7a32c..34cec413 100644
--- a/sys/mips/rt305x/obio.c
+++ b/sys/mips/rt305x/obio.c
@@ -98,8 +98,8 @@ static int obio_activate_resource(device_t, device_t, int, int,
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 @@ obio_attach(device_t dev)
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);
diff --git a/sys/mips/rt305x/rt305x_gpio.c b/sys/mips/rt305x/rt305x_gpio.c
index 1ce02d7..e4f645f 100644
--- a/sys/mips/rt305x/rt305x_gpio.c
+++ b/sys/mips/rt305x/rt305x_gpio.c
@@ -546,7 +546,7 @@ rt305x_gpio_detach(device_t dev)
#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;
diff --git a/sys/mips/rt305x/rt305x_pci.c b/sys/mips/rt305x/rt305x_pci.c
index c681dc6..68a9d86 100644
--- a/sys/mips/rt305x/rt305x_pci.c
+++ b/sys/mips/rt305x/rt305x_pci.c
@@ -204,7 +204,7 @@ rt305x_pci_write_ivar(device_t dev, device_t child, int which,
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;
diff --git a/sys/mips/sentry5/obio.c b/sys/mips/sentry5/obio.c
index 51eaa9d..15abbdf 100644
--- a/sys/mips/sentry5/obio.c
+++ b/sys/mips/sentry5/obio.c
@@ -113,7 +113,7 @@ obio_attach(device_t dev)
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;
diff --git a/sys/mips/sibyte/sb_zbbus.c b/sys/mips/sibyte/sb_zbbus.c
index b96409b..2858421 100644
--- a/sys/mips/sibyte/sb_zbbus.c
+++ b/sys/mips/sibyte/sb_zbbus.c
@@ -280,7 +280,7 @@ zbbus_hinted_child(device_t bus, const char *dname, int dunit)
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;
diff --git a/sys/mips/sibyte/sb_zbpci.c b/sys/mips/sibyte/sb_zbpci.c
index 7852a41..df3c4b8 100644
--- a/sys/mips/sibyte/sb_zbpci.c
+++ b/sys/mips/sibyte/sb_zbpci.c
@@ -165,7 +165,7 @@ zbpci_attach(device_t dev)
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;
diff --git a/sys/pc98/pc98/canbus.c b/sys/pc98/pc98/canbus.c
index daacdbd..8c3ee4e 100644
--- a/sys/pc98/pc98/canbus.c
+++ b/sys/pc98/pc98/canbus.c
@@ -84,7 +84,7 @@ static int canbus_detach(device_t);
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_deactivate_resource(
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 @@ canbus_add_child(device_t bus, u_int order, const char *name, int unit)
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 @@ canbus_release_resource(
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);
diff --git a/sys/powerpc/mpc85xx/lbc.c b/sys/powerpc/mpc85xx/lbc.c
index 8bb92b2..f9a1718 100644
--- a/sys/powerpc/mpc85xx/lbc.c
+++ b/sys/powerpc/mpc85xx/lbc.c
@@ -69,7 +69,7 @@ static int lbc_probe(device_t);
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 @@ lbc_shutdown(device_t dev)
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;
diff --git a/sys/powerpc/ofw/ofw_pci.c b/sys/powerpc/ofw/ofw_pci.c
index 2deea28..0ca5bc0 100644
--- a/sys/powerpc/ofw/ofw_pci.c
+++ b/sys/powerpc/ofw/ofw_pci.c
@@ -62,8 +62,8 @@ __FBSDID("$FreeBSD$");
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 @@ static int ofw_pci_deactivate_resource(device_t bus,
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 @@ ofw_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
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 @@ ofw_pci_deactivate_resource(device_t bus, device_t child, int type, int rid,
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);
diff --git a/sys/powerpc/powermac/macgpio.c b/sys/powerpc/powermac/macgpio.c
index 4544fef..8268038 100644
--- a/sys/powerpc/powermac/macgpio.c
+++ b/sys/powerpc/powermac/macgpio.c
@@ -71,7 +71,7 @@ static int macgpio_attach(device_t);
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 @@ macgpio_probe_nomatch(device_t dev, device_t child)
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;
diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c
index b495cb3..669e907 100644
--- a/sys/powerpc/powermac/macio.c
+++ b/sys/powerpc/powermac/macio.c
@@ -78,7 +78,8 @@ static int macio_attach(device_t);
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 @@ macio_probe_nomatch(device_t dev, device_t child)
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;
diff --git a/sys/powerpc/powermac/uninorth.c b/sys/powerpc/powermac/uninorth.c
index 421e625..e34c9d8 100644
--- a/sys/powerpc/powermac/uninorth.c
+++ b/sys/powerpc/powermac/uninorth.c
@@ -72,7 +72,8 @@ static int unin_chip_attach(device_t);
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 @@ unin_chip_probe_nomatch(device_t dev, device_t child)
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;
diff --git a/sys/powerpc/psim/ata_iobus.c b/sys/powerpc/psim/ata_iobus.c
index 69c2036..bf059b7 100644
--- a/sys/powerpc/psim/ata_iobus.c
+++ b/sys/powerpc/psim/ata_iobus.c
@@ -59,7 +59,8 @@ static int ata_iobus_attach(device_t dev);
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 @@ ata_iobus_print_child(device_t dev, device_t child)
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;
diff --git a/sys/powerpc/psim/iobus.c b/sys/powerpc/psim/iobus.c
index 6a6ac27..21f53f1 100644
--- a/sys/powerpc/psim/iobus.c
+++ b/sys/powerpc/psim/iobus.c
@@ -72,7 +72,8 @@ static void iobus_probe_nomatch(device_t, device_t);
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 @@ iobus_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
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;
diff --git a/sys/sparc64/central/central.c b/sys/sparc64/central/central.c
index 86cb3f4..62fa79d 100644
--- a/sys/sparc64/central/central.c
+++ b/sys/sparc64/central/central.c
@@ -183,8 +183,8 @@ central_attach(device_t dev)
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 @@ central_probe_nomatch(device_t dev, device_t child)
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;
diff --git a/sys/sparc64/ebus/ebus.c b/sys/sparc64/ebus/ebus.c
index 0967c5d..961dd07 100644
--- a/sys/sparc64/ebus/ebus.c
+++ b/sys/sparc64/ebus/ebus.c
@@ -427,7 +427,7 @@ ebus_probe_nomatch(device_t dev, device_t child)
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 @@ ebus_activate_resource(device_t bus, device_t child, int type, int rid,
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);
diff --git a/sys/sparc64/fhc/fhc.c b/sys/sparc64/fhc/fhc.c
index 4d6a6bd..3de81ff 100644
--- a/sys/sparc64/fhc/fhc.c
+++ b/sys/sparc64/fhc/fhc.c
@@ -420,7 +420,7 @@ fhc_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
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 @@ fhc_alloc_resource(device_t bus, device_t child, int type, int *rid,
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);
diff --git a/sys/sparc64/isa/isa.c b/sys/sparc64/isa/isa.c
index 6783440..ad4bcdb 100644
--- a/sys/sparc64/isa/isa.c
+++ b/sys/sparc64/isa/isa.c
@@ -273,7 +273,7 @@ isa_setup_children(device_t dev, phandle_t parent)
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.
diff --git a/sys/sparc64/pci/apb.c b/sys/sparc64/pci/apb.c
index c0d6172..c2fe508 100644
--- a/sys/sparc64/pci/apb.c
+++ b/sys/sparc64/pci/apb.c
@@ -130,7 +130,7 @@ apb_probe(device_t dev)
}
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 @@ apb_map_print(uint8_t map, u_long scale)
}
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 @@ apb_attach(device_t dev)
*/
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 @@ apb_alloc_resource(device_t dev, device_t child, int type, int *rid,
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;
diff --git a/sys/sparc64/pci/fire.c b/sys/sparc64/pci/fire.c
index be0c64b..c2d2285 100644
--- a/sys/sparc64/pci/fire.c
+++ b/sys/sparc64/pci/fire.c
@@ -1852,7 +1852,7 @@ fire_teardown_intr(device_t dev, device_t child, struct resource *ires,
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;
diff --git a/sys/sparc64/pci/ofw_pci.c b/sys/sparc64/pci/ofw_pci.c
index a18052f..8babd49 100644
--- a/sys/sparc64/pci/ofw_pci.c
+++ b/sys/sparc64/pci/ofw_pci.c
@@ -287,7 +287,7 @@ ofw_pci_read_ivar(device_t dev, device_t child __unused, int which,
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 @@ ofw_pci_activate_resource(device_t bus, device_t child, int type, int rid,
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;
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index 38f4656..496df96 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -1038,7 +1038,7 @@ psycho_setup_intr(device_t dev, device_t child, struct resource *ires,
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;
diff --git a/sys/sparc64/pci/sbbc.c b/sys/sparc64/pci/sbbc.c
index f1e7fab..e509363 100644
--- a/sys/sparc64/pci/sbbc.c
+++ b/sys/sparc64/pci/sbbc.c
@@ -397,7 +397,7 @@ sbbc_pci_attach(device_t dev)
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 @@ sbbc_bus_deactivate_resource(device_t bus, device_t child, int type, int rid,
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);
diff --git a/sys/sparc64/pci/schizo.c b/sys/sparc64/pci/schizo.c
index ed1cccd..a96155b 100644
--- a/sys/sparc64/pci/schizo.c
+++ b/sys/sparc64/pci/schizo.c
@@ -1196,7 +1196,7 @@ schizo_setup_intr(device_t dev, device_t child, struct resource *ires,
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;
diff --git a/sys/sparc64/sbus/sbus.c b/sys/sparc64/sbus/sbus.c
index 0b27655..e4bc3b4 100644
--- a/sys/sparc64/sbus/sbus.c
+++ b/sys/sparc64/sbus/sbus.c
@@ -710,7 +710,7 @@ sbus_setup_intr(device_t dev, device_t child, struct resource *ires, int flags,
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 @@ sbus_activate_resource(device_t bus, device_t child, int type, int rid,
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;
diff --git a/sys/sparc64/sparc64/nexus.c b/sys/sparc64/sparc64/nexus.c
index 30374e5..7082220 100644
--- a/sys/sparc64/sparc64/nexus.c
+++ b/sys/sparc64/sparc64/nexus.c
@@ -359,7 +359,7 @@ nexus_describe_intr(device_t bus __unused, device_t child __unused,
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 @@ nexus_deactivate_resource(device_t bus __unused, device_t child __unused,
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;
diff --git a/sys/sparc64/sparc64/upa.c b/sys/sparc64/sparc64/upa.c
index cd615d9..f3a73bc 100644
--- a/sys/sparc64/sparc64/upa.c
+++ b/sys/sparc64/sparc64/upa.c
@@ -194,7 +194,7 @@ upa_attach(device_t dev)
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 @@ upa_probe_nomatch(device_t dev, device_t child)
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 @@ upa_setup_intr(device_t dev, device_t child, struct resource *ires, int flags,
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);
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index 7904a4f..3b3c16d 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -112,4 +112,6 @@ typedef union {
__int64_t _mbstateL; /* for alignment */
} __mbstate_t;
+typedef unsigned long __rman_res_t;
+
#endif /* !_SYS__TYPES_H_ */
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index 42d3a3f..4348ae7 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -292,9 +292,9 @@ struct resource_list_entry {
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 @@ void resource_list_free(struct resource_list *rl);
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 @@ 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);
+ 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 @@ 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);
+ 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 @@ device_t
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 @@ int bus_generic_setup_intr(device_t dev, device_t child,
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 @@ void bus_release_resources(device_t dev, const struct resource_spec *rs,
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_bind_intr(device_t dev, struct resource *r, int cpu);
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);
diff --git a/sys/sys/rman.h b/sys/sys/rman.h
index d98dac7..0ccafff 100644
--- a/sys/sys/rman.h
+++ b/sys/sys/rman.h
@@ -61,6 +61,8 @@ enum rman_type { RMAN_UNINIT = 0, RMAN_GAUGE, RMAN_ARRAY };
*/
#define RM_TEXTLEN 32
+#define RM_MAX_END ((rman_res_t)~0)
+
/*
* Userspace-exported structures.
*/
@@ -70,8 +72,8 @@ struct u_resource {
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 @@ struct u_rman {
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 rman {
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;
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 4dfd8ef..579b104 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -250,6 +250,8 @@ typedef __vm_paddr_t vm_paddr_t;
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;
diff --git a/sys/x86/include/legacyvar.h b/sys/x86/include/legacyvar.h
index 856b352..7335de2 100644
--- a/sys/x86/include/legacyvar.h
+++ b/sys/x86/include/legacyvar.h
@@ -56,9 +56,10 @@ void legacy_pcib_write_config(device_t dev, u_int bus, u_int slot,
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,
diff --git a/sys/x86/include/pci_cfgreg.h b/sys/x86/include/pci_cfgreg.h
index ea5e319..733b91c 100644
--- a/sys/x86/include/pci_cfgreg.h
+++ b/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);
diff --git a/sys/x86/isa/atrtc.c b/sys/x86/isa/atrtc.c
index d969594..c1e796f 100644
--- a/sys/x86/isa/atrtc.c
+++ b/sys/x86/isa/atrtc.c
@@ -241,7 +241,7 @@ static int
atrtc_attach(device_t dev)
{
struct atrtc_softc *sc;
- u_long s;
+ rman_res_t s;
int i;
sc = device_get_softc(dev);
diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c
index 8ed68e0..8778c0d 100644
--- a/sys/x86/isa/clock.c
+++ b/sys/x86/isa/clock.c
@@ -656,7 +656,7 @@ static int
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);
diff --git a/sys/x86/isa/isa.c b/sys/x86/isa/isa.c
index 605af59..3de119f 100644
--- a/sys/x86/isa/isa.c
+++ b/sys/x86/isa/isa.c
@@ -88,7 +88,7 @@ isa_init(device_t dev)
*/
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.
diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c
index 821265d..5f0df39 100644
--- a/sys/x86/pci/pci_bus.c
+++ b/sys/x86/pci/pci_bus.c
@@ -578,8 +578,8 @@ static unsigned long host_mem_start = 0x80000000;
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 @@ hostb_alloc_start(int type, u_long start, u_long end, u_long count)
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 @@ legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
#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)
diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c
index 2650986..60ad028 100644
--- a/sys/x86/pci/qpi.c
+++ b/sys/x86/pci/qpi.c
@@ -241,7 +241,7 @@ qpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
#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)
diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c
index 31165ae..6533484 100644
--- a/sys/x86/x86/mptable_pci.c
+++ b/sys/x86/x86/mptable_pci.c
@@ -75,7 +75,7 @@ mptable_hostb_attach(device_t dev)
#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 @@ mptable_is_isa_range(u_long start, u_long end)
}
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 @@ mptable_is_vga_range(u_long start, u_long end)
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 @@ mptable_hostb_alloc_resource(device_t dev, device_t child, int type, int *rid,
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;
diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c
index fb32c9b..6b61b39 100644
--- a/sys/x86/x86/nexus.c
+++ b/sys/x86/x86/nexus.c
@@ -99,9 +99,10 @@ static int nexus_print_child(device_t, device_t);
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_setup_intr(device_t, device_t, struct resource *, int flags,
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 @@ nexus_rman(int type)
*/
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 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid,
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 @@ nexus_get_reslist(device_t dev, device_t child)
}
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 @@ nexus_set_resource(device_t dev, device_t child, int type, int rid, u_long start
}
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;
OpenPOWER on IntegriCloud