MFamd64/ia64/i386: Only set the rman bus tags and handles in

bus_activate_resource() methods instead of splitting it up between
bus_alloc_resource() and bus_activate_resource().

Glanced at by:	marcel
This commit is contained in:
John Baldwin 2007-12-20 21:42:43 +00:00
parent f16627aadc
commit 7439d1d9f0
4 changed files with 4 additions and 8 deletions

View File

@ -398,8 +398,6 @@ grackle_alloc_resource(device_t bus, device_t child, int type, int *rid,
}
rman_set_rid(rv, *rid);
rman_set_bustag(rv, &bs_le_tag);
rman_set_bushandle(rv, rman_get_start(rv));
if (needactivate) {
if (bus_activate_resource(child, type, *rid, rv) != 0) {
@ -459,6 +457,7 @@ grackle_activate_resource(device_t bus, device_t child, int type, int rid,
return (ENOMEM);
rman_set_virtual(res, p);
rman_set_bustag(rv, &bs_le_tag);
rman_set_bushandle(res, (u_long)p);
}

View File

@ -445,8 +445,6 @@ macio_alloc_resource(device_t bus, device_t child, int type, int *rid,
}
rman_set_rid(rv, *rid);
rman_set_bustag(rv, &bs_le_tag);
rman_set_bushandle(rv, rman_get_start(rv));
if (needactivate) {
if (bus_activate_resource(child, type, *rid, rv) != 0) {
@ -494,6 +492,7 @@ macio_activate_resource(device_t bus, device_t child, int type, int rid,
if (p == NULL)
return (ENOMEM);
rman_set_virtual(res, p);
rman_set_bustag(rv, &bs_le_tag);
rman_set_bushandle(res, (u_long)p);
}

View File

@ -382,8 +382,6 @@ uninorth_alloc_resource(device_t bus, device_t child, int type, int *rid,
}
rman_set_rid(rv, *rid);
rman_set_bustag(rv, &bs_le_tag);
rman_set_bushandle(rv, rman_get_start(rv));
if (needactivate) {
if (bus_activate_resource(child, type, *rid, rv) != 0) {
@ -429,6 +427,7 @@ uninorth_activate_resource(device_t bus, device_t child, int type, int rid,
if (p == NULL)
return (ENOMEM);
rman_set_virtual(res, p);
rman_set_bustag(rv, &bs_le_tag);
rman_set_bushandle(res, (u_long)p);
}

View File

@ -339,8 +339,6 @@ iobus_alloc_resource(device_t bus, device_t child, int type, int *rid,
}
rman_set_rid(rv, *rid);
rman_set_bustag(rv, &bs_le_tag);
rman_set_bushandle(rv, rman_get_start(rv));
if (needactivate) {
if (bus_activate_resource(child, type, *rid, rv) != 0) {
@ -388,6 +386,7 @@ iobus_activate_resource(device_t bus, device_t child, int type, int rid,
if (p == NULL)
return (ENOMEM);
rman_set_virtual(res, p);
rman_set_bustag(rv, &bs_le_tag);
rman_set_bushandle(res, (u_long)p);
}