diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/luna88k/luna88k/pmap.c | 17 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/pmap.c | 17 |
2 files changed, 24 insertions, 10 deletions
diff --git a/sys/arch/luna88k/luna88k/pmap.c b/sys/arch/luna88k/luna88k/pmap.c index fdf013e46da..94131804dff 100644 --- a/sys/arch/luna88k/luna88k/pmap.c +++ b/sys/arch/luna88k/luna88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.2 2004/05/07 15:30:02 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.3 2004/05/23 21:09:49 miod Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Miodrag Vallat * Copyright (c) 1998-2001 Steve Murphree, Jr. @@ -290,21 +290,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 } /* 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 } /* |