summaryrefslogtreecommitdiffstats
path: root/sys/arm64
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 /sys/arm64
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
Diffstat (limited to 'sys/arm64')
-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
4 files changed, 13 insertions, 12 deletions
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;
OpenPOWER on IntegriCloud