Module Name:    src
Committed By:   bouyer
Date:           Thu Jan 19 22:00:57 UTC 2012

Modified Files:
        src/sys/arch/amd64/include: pmap.h
        src/sys/arch/i386/include: pmap.h

Log Message:
pmap_pte_set() is not supposed to be atomic, so only raise IPL, no need to
take pte_lock


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amd64/include/pmap.h
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/i386/include/pmap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/include/pmap.h
diff -u src/sys/arch/amd64/include/pmap.h:1.30 src/sys/arch/amd64/include/pmap.h:1.31
--- src/sys/arch/amd64/include/pmap.h:1.30	Sun Jan 15 16:48:31 2012
+++ src/sys/arch/amd64/include/pmap.h	Thu Jan 19 22:00:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.30 2012/01/15 16:48:31 cherry Exp $	*/
+/*	$NetBSD: pmap.h,v 1.31 2012/01/19 22:00:56 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -278,9 +278,9 @@ pmap_pte2pa(pt_entry_t pte)
 static __inline void
 pmap_pte_set(pt_entry_t *pte, pt_entry_t npte)
 {
-	mutex_enter(&pte_lock);
+	int s = splvm();
 	xpq_queue_pte_update(xpmap_ptetomach(pte), npte);
-	mutex_exit(&pte_lock);
+	splx(s);
 }
 
 static __inline pt_entry_t

Index: src/sys/arch/i386/include/pmap.h
diff -u src/sys/arch/i386/include/pmap.h:1.113 src/sys/arch/i386/include/pmap.h:1.114
--- src/sys/arch/i386/include/pmap.h:1.113	Mon Jan  9 13:04:13 2012
+++ src/sys/arch/i386/include/pmap.h	Thu Jan 19 22:00:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.113 2012/01/09 13:04:13 cherry Exp $	*/
+/*	$NetBSD: pmap.h,v 1.114 2012/01/19 22:00:57 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -370,9 +370,9 @@ pmap_pte2pa(pt_entry_t pte)
 static __inline void
 pmap_pte_set(pt_entry_t *pte, pt_entry_t npte)
 {
-	mutex_enter(&pte_lock);
+	int s = splvm();
 	xpq_queue_pte_update(xpmap_ptetomach(pte), npte);
-	mutex_exit(&pte_lock);
+	splx(s);
 }
 
 static __inline pt_entry_t

Reply via email to