Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch pmap_pte_set() is not supposed to be atomic, so onl...



details:   https://anonhg.NetBSD.org/src/rev/c4d2cb0961bf
branches:  trunk
changeset: 772883:c4d2cb0961bf
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Jan 19 22:00:56 2012 +0000

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

diffstat:

 sys/arch/amd64/include/pmap.h |  6 +++---
 sys/arch/i386/include/pmap.h  |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r 4be452a3a227 -r c4d2cb0961bf sys/arch/amd64/include/pmap.h
--- a/sys/arch/amd64/include/pmap.h     Thu Jan 19 21:35:11 2012 +0000
+++ b/sys/arch/amd64/include/pmap.h     Thu Jan 19 22:00:56 2012 +0000
@@ -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 @@
 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
diff -r 4be452a3a227 -r c4d2cb0961bf sys/arch/i386/include/pmap.h
--- a/sys/arch/i386/include/pmap.h      Thu Jan 19 21:35:11 2012 +0000
+++ b/sys/arch/i386/include/pmap.h      Thu Jan 19 22:00:56 2012 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index