PERFORCE change 151641 for review

Nathan Whitehorn nwhitehorn at FreeBSD.org
Tue Oct 21 02:33:59 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=151641

Change 151641 by nwhitehorn at nwhitehorn_trantor on 2008/10/21 02:33:00

	Missed part of the last commit in nexus.

Affected files ...

.. //depot/projects/ppc-g5/sys/powerpc/aim/nexus.c#5 edit

Differences ...

==== //depot/projects/ppc-g5/sys/powerpc/aim/nexus.c#5 (text+ko) ====

@@ -447,6 +447,7 @@
 		start = (vm_offset_t)rman_get_start(res);
 
 		p = pmap_mapdev(start, (vm_size_t)rman_get_size(res));
+
 		if (p == NULL)
 			return (ENOMEM);
 		rman_set_virtual(res, p);
@@ -461,7 +462,10 @@
 nexus_deactivate_resource(device_t bus, device_t child, int type, int rid,
     struct resource *res)
 {
-	/* Not much to be done yet... */
+	if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) {
+		pmap_unmapdev((vm_offset_t)rman_get_virtual(res),
+		    (vm_size_t)rman_get_size(res));
+	}
 	return (rman_deactivate_resource(res));
 }
 
@@ -469,12 +473,7 @@
 nexus_release_resource(device_t bus, device_t child, int type, int rid,
     struct resource *res)
 {
-	if (type != SYS_RES_IRQ) {
-		device_printf(bus, "unknown resource request from %s\n",
-		    device_get_nameunit(child));
-		return (EINVAL);
-	}
-
+	/* Not much to be done yet... */
 	return (rman_release_resource(res));
 }
 


More information about the p4-projects mailing list