svn commit: r192160 - head/sys/kern

Dag-Erling Smorgrav des at FreeBSD.org
Fri May 15 21:34:58 UTC 2009


Author: des
Date: Fri May 15 21:34:58 2009
New Revision: 192160
URL: http://svn.freebsd.org/changeset/base/192160

Log:
  Remove do-nothing code that was required to dirty the old buffer on Alpha.
  
  Coverity ID:	838
  Approved by:	jhb, alc

Modified:
  head/sys/kern/kern_sysctl.c

Modified: head/sys/kern/kern_sysctl.c
==============================================================================
--- head/sys/kern/kern_sysctl.c	Fri May 15 21:12:10 2009	(r192159)
+++ head/sys/kern/kern_sysctl.c	Fri May 15 21:34:58 2009	(r192160)
@@ -1373,8 +1373,7 @@ int
 sysctl_wire_old_buffer(struct sysctl_req *req, size_t len)
 {
 	int ret;
-	size_t i, wiredlen;
-	char *cp, dummy;
+	size_t wiredlen;
 
 	wiredlen = (len > 0 && len < req->oldlen) ? len : req->oldlen;
 	ret = 0;
@@ -1387,16 +1386,6 @@ sysctl_wire_old_buffer(struct sysctl_req
 					return (ret);
 				wiredlen = 0;
 			}
-			/*
-			 * Touch all the wired pages to avoid PTE modified
-			 * bit emulation traps on Alpha while holding locks
-			 * in the sysctl handler.
-			 */
-			for (i = (wiredlen + PAGE_SIZE - 1) / PAGE_SIZE,
-			    cp = req->oldptr; i > 0; i--, cp += PAGE_SIZE) {
-				copyin(cp, &dummy, 1);
-				copyout(&dummy, cp, 1);
-			}
 		}
 		req->lock = REQ_WIRED;
 		req->validlen = wiredlen;


More information about the svn-src-all mailing list