From bdfb66f8cac12fd6c2da259f8eb97f12a701c4d3 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 20 Apr 2006 04:19:10 +0000 Subject: [PATCH] Set the rid for any resource obtained from rman_resource_reserve. --- sys/powerpc/powermac/grackle.c | 1 + sys/powerpc/powermac/hrowpic.c | 1 + sys/powerpc/powermac/macio.c | 1 + sys/powerpc/powermac/uninorth.c | 1 + sys/powerpc/powerpc/openpic.c | 2 +- sys/powerpc/psim/iobus.c | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/powermac/grackle.c b/sys/powerpc/powermac/grackle.c index ee6809d0aaa1..9b3cffac1e63 100644 --- a/sys/powerpc/powermac/grackle.c +++ b/sys/powerpc/powermac/grackle.c @@ -398,6 +398,7 @@ grackle_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); } + rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, rman_get_start(rv)); diff --git a/sys/powerpc/powermac/hrowpic.c b/sys/powerpc/powermac/hrowpic.c index 2d39ef406300..09008900fc6e 100644 --- a/sys/powerpc/powermac/hrowpic.c +++ b/sys/powerpc/powermac/hrowpic.c @@ -214,6 +214,7 @@ hrowpic_allocate_intr(device_t picdev, device_t child, int *rid, u_long intr, device_get_nameunit(child)); return (NULL); } + rman_set_rid(rv, *rid); return (rv); } diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c index 22f71d43e6ba..d3d3dd4a43fd 100644 --- a/sys/powerpc/powermac/macio.c +++ b/sys/powerpc/powermac/macio.c @@ -448,6 +448,7 @@ macio_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); } + rman_set_rid(rv, *rid); rman_set_bustag(rv, tagval); rman_set_bushandle(rv, rman_get_start(rv)); diff --git a/sys/powerpc/powermac/uninorth.c b/sys/powerpc/powermac/uninorth.c index 0464593f3da0..fb1674d37a19 100644 --- a/sys/powerpc/powermac/uninorth.c +++ b/sys/powerpc/powermac/uninorth.c @@ -384,6 +384,7 @@ uninorth_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); } + rman_set_rid(rv, *rid); rman_set_bustag(rv, bt); rman_set_bushandle(rv, rman_get_start(rv)); diff --git a/sys/powerpc/powerpc/openpic.c b/sys/powerpc/powerpc/openpic.c index b1b79fdaf2b9..754b1ae4ec70 100644 --- a/sys/powerpc/powerpc/openpic.c +++ b/sys/powerpc/powerpc/openpic.c @@ -212,7 +212,7 @@ openpic_allocate_intr(device_t dev, device_t child, int *rid, u_long intr, device_get_nameunit(child)); return (NULL); } - + rman_set_rid(rv, *rid); if (needactivate) { if (bus_activate_resource(child, SYS_RES_IRQ, *rid, rv) != 0) { device_printf(dev, diff --git a/sys/powerpc/psim/iobus.c b/sys/powerpc/psim/iobus.c index c16a388e67d8..30cbeed7cedf 100644 --- a/sys/powerpc/psim/iobus.c +++ b/sys/powerpc/psim/iobus.c @@ -341,6 +341,7 @@ iobus_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); } + rman_set_rid(rv, *rid); rman_set_bustag(rv, tagval); rman_set_bushandle(rv, rman_get_start(rv));