diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-01-27 17:00:03 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-01-27 17:00:03 +0000 |
commit | 890d7a4b7b3aa790227391fcd092c931f249d6f1 (patch) | |
tree | 3df9395bceb75fe1f757775d0022585085044026 /sys/arch/sparc | |
parent | f315b69bdb7f24da31c33a5500265b0ff1f51eab (diff) |
pmap_writetext - use getptep4m/setpgt and avoid one unnecessary table walk
Diffstat (limited to 'sys/arch/sparc')
-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) |