diff options
author | 2000-01-27 17:00:02 +0000 | |
---|---|---|
committer | 2000-01-27 17:00:02 +0000 | |
commit | 586e530b5314c0e6ce4ce0f4788ee670bc2038a6 (patch) | |
tree | 91c6c632fadc68e4f71bbd25f8f58f4aa8513b29 | |
parent | It's amazing what you can find with some code reading. (diff) | |
download | wireguard-openbsd-586e530b5314c0e6ce4ce0f4788ee670bc2038a6.tar.xz wireguard-openbsd-586e530b5314c0e6ce4ce0f4788ee670bc2038a6.zip |
pmap_writetext - use getptep4m/setpgt and avoid one unnecessary table walk
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 00edacfcdfb..47cdde1d2b7 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.67 2000/01/27 15:48:19 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.68 2000/01/27 17:00:02 art Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -6938,16 +6938,20 @@ pmap_writetext(dst, ch) #if defined(SUN4M) if (CPU_ISSUN4M) { - pte0 = getpte4m(va); + int *ptep; + + ptep = getptep4m(pmap_kernel(), va); + pte0 = *ptep; if ((pte0 & SRMMU_TETYPE) != SRMMU_TEPTE) { splx(s); return; } pte = pte0 | PPROT_WRITE; - setpte4m(va, pte); + tlb_flush_page((vaddr_t)va); + setpgt4m(ptep, pte); *dst = (unsigned char)ch; - setpte4m(va, pte0); - + tlb_flush_page((vaddr_t)va); + setpgt4m(ptep, pte0); } #endif #if defined(SUN4) || defined(SUN4C) |