diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2016-01-27 02:23:54 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2016-01-27 02:23:54 +0000 |
commit | 31bb8ee5bdf9a6332a86e4774ebdccba877ce42e (patch) | |
tree | 5ac500b634909ff3fe2556201aef7e16d85316d2 /sys/powerpc | |
parent | d2ca0a07825355904475b1fe585efdd49eeae0b3 (diff) | |
download | FreeBSD-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/powerpc')
-rw-r--r-- | sys/powerpc/mpc85xx/lbc.c | 4 | ||||
-rw-r--r-- | sys/powerpc/ofw/ofw_pci.c | 12 | ||||
-rw-r--r-- | sys/powerpc/powermac/macgpio.c | 5 | ||||
-rw-r--r-- | sys/powerpc/powermac/macio.c | 6 | ||||
-rw-r--r-- | sys/powerpc/powermac/uninorth.c | 6 | ||||
-rw-r--r-- | sys/powerpc/psim/ata_iobus.c | 6 | ||||
-rw-r--r-- | sys/powerpc/psim/iobus.c | 6 |
7 files changed, 27 insertions, 18 deletions
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; |