diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-05-23 21:09:51 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-05-23 21:09:51 +0000 |
commit | 6c79b973d8257d681875f724a62d1f8302f646ba (patch) | |
tree | 209b1f7e04f21fddbbefbfed9f4bc1b81d77c81d /sys/arch/mvme88k | |
parent | 31d4c9fe0969db7e1ef9f436837405f3ac18201b (diff) |
Put back the fixed NCPUS == 1 version of flush_atc_entry().
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/pmap.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/mvme88k/pmap.c b/sys/arch/mvme88k/mvme88k/pmap.c index 3d3e5d99cd4..ec06c845ab3 100644 --- a/sys/arch/mvme88k/mvme88k/pmap.c +++ b/sys/arch/mvme88k/mvme88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.114 2004/05/07 15:30:04 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.115 2004/05/23 21:09:50 miod Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -270,21 +270,28 @@ m88k_protection(pmap_t pmap, vm_prot_t prot) void flush_atc_entry(long users, vaddr_t va, boolean_t kernel) { +#if NCPUS > 1 int cpu; - long tusers = users; + + if (users == 0) + return; #ifdef DEBUG - if ((tusers != 0) && (ff1(tusers) >= MAX_CPUS)) { + if (ff1(users) >= MAX_CPUS) { panic("flush_atc_entry: invalid ff1 users = %d", ff1(tusers)); } #endif - while ((cpu = ff1(tusers)) != 32) { + while ((cpu = ff1(users)) != 32) { if (cpu_sets[cpu]) { /* just checking to make sure */ cmmu_flush_tlb(cpu, kernel, va, PAGE_SIZE); } - tusers &= ~(1 << cpu); + users &= ~(1 << cpu); } +#else + if (users != 0) + cmmu_flush_tlb(cpu_number(), kernel, va, PAGE_SIZE); +#endif } /* |