diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-08-01 18:39:13 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-08-01 18:39:13 +0000 |
commit | 27faaf6cf6a973ec2b0b03e6da8a9164e6ec14fd (patch) | |
tree | d9f21978bc45b5be7077fb2703db609f3ba89bbb /sys/arch/mvme88k | |
parent | 2d20cde55478226007ec883b6d9b23fef250448f (diff) |
pmap_kremove was so broken I'd rather pretend I did not write it...
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/pmap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/mvme88k/mvme88k/pmap.c b/sys/arch/mvme88k/mvme88k/pmap.c index c5c31aa265d..589ceacb35a 100644 --- a/sys/arch/mvme88k/mvme88k/pmap.c +++ b/sys/arch/mvme88k/mvme88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.69 2003/08/01 07:48:24 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.70 2003/08/01 18:39:12 miod Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -156,7 +156,7 @@ kpdt_entry_t kpdt_free; #define M1x7_PDT_SIZE 0 #endif -#if defined(MVME188) && defined(MVME187) || defined(MVME197) +#if defined(MVME188) && (defined(MVME187) || defined(MVME197)) #define OBIO_PDT_SIZE ((brdtyp == BRD_188) ? M188_PDT_SIZE : M1x7_PDT_SIZE) #else #define OBIO_PDT_SIZE MAX(M188_PDT_SIZE, M1x7_PDT_SIZE) @@ -2924,6 +2924,7 @@ pmap_kremove(vaddr_t va, vsize_t len) { int spl; u_int users; + vaddr_t e; #ifdef DEBUG if ((pmap_con_dbg & (CD_RM | CD_NORM)) == (CD_RM | CD_NORM)) @@ -2936,8 +2937,8 @@ pmap_kremove(vaddr_t va, vsize_t len) PMAP_LOCK(kernel_pmap, spl); users = kernel_pmap->pm_cpus; - for (len >>= PAGE_SHIFT; len != 0; len--, va += PAGE_SIZE) { - vaddr_t e = va + PAGE_SIZE; + e = va + round_page(len); + for (; va < e; va += PAGE_SIZE) { sdt_entry_t *sdt; pt_entry_t *pte; |