diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-07 10:52:26 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-07 10:52:26 +0000 |
commit | 5e1aa707c4f246858fabf68df97013ae117e480b (patch) | |
tree | b93977f9d1d71e3d2275ee33c2badd97b8cf7947 | |
parent | 379c6a0a449a74f186c0990e39eb76a02ed09116 (diff) |
kvm_recache is now unnecessary, simplify.
-rw-r--r-- | sys/arch/sparc/include/pmap.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 27 |
2 files changed, 8 insertions, 25 deletions
diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h index e3930470e3d..a67cbb80097 100644 --- a/sys/arch/sparc/include/pmap.h +++ b/sys/arch/sparc/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.28 2001/12/07 10:44:51 art Exp $ */ +/* $OpenBSD: pmap.h,v 1.29 2001/12/07 10:52:25 art Exp $ */ /* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */ /* @@ -300,9 +300,7 @@ void pmap_init __P((void)); int pmap_page_index __P((paddr_t)); void pmap_virtual_space __P((vaddr_t *, vaddr_t *)); void pmap_redzone __P((void)); -void kvm_setcache __P((caddr_t, int, int)); -#define kvm_uncache(addr, npages) kvm_setcache(addr, npages, 0) -#define kvm_recache(addr, npages) kvm_setcache(addr, npages, 1) +void kvm_uncache __P((caddr_t, int)); struct user; void switchexit __P((struct proc *)); int mmu_pagein __P((struct pmap *pm, vaddr_t, int)); diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index fe4d7b4e6d7..90c7c2f9eb2 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.104 2001/12/07 10:44:52 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.105 2001/12/07 10:52:25 art Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -6019,10 +6019,7 @@ pmap_phys_address(x) * in locked kernel space. A cache flush is also done. */ void -kvm_setcache(va, npages, cached) - caddr_t va; - int npages; - int cached; +kvm_uncache(caddr_t va, int npages) { int pte; struct pvlist *pv; @@ -6043,15 +6040,9 @@ kvm_setcache(va, npages, cached) #endif pv = pvhead((pte & SRMMU_PPNMASK) >> SRMMU_PPNSHIFT); if (pv) { - if (cached) - pv_changepte4m(pv, SRMMU_PG_C, 0); - else - pv_changepte4m(pv, 0, SRMMU_PG_C); + pv_changepte4m(pv, 0, SRMMU_PG_C); } - if (cached) - pte |= SRMMU_PG_C; - else - pte &= ~SRMMU_PG_C; + pte &= ~SRMMU_PG_C; tlb_flush_page((vaddr_t)va); setpgt4m(ptep, pte); @@ -6072,15 +6063,9 @@ kvm_setcache(va, npages, cached) pv = pvhead(pte & PG_PFNUM); /* XXX - we probably don't need to check for OBMEM */ if ((pte & PG_TYPE) == PG_OBMEM && pv) { - if (cached) - pv_changepte4_4c(pv, 0, PG_NC); - else - pv_changepte4_4c(pv, PG_NC, 0); + pv_changepte4_4c(pv, PG_NC, 0); } - if (cached) - pte &= ~PG_NC; - else - pte |= PG_NC; + pte |= PG_NC; setpte4(va, pte); if ((pte & PG_TYPE) == PG_OBMEM) cache_flush_page((int)va); |