summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-05-16 07:57:44 +0000
committermarcel <marcel@FreeBSD.org>2003-05-16 07:57:44 +0000
commit7658c8da7d7d2e9c9207edbad64b2d40206bab3f (patch)
treef391b5e5ae048c5091959defe57105f0031c92fa /sys
parent98685b881472fb002a0509b6090a994365270c9e (diff)
downloadFreeBSD-src-7658c8da7d7d2e9c9207edbad64b2d40206bab3f.zip
FreeBSD-src-7658c8da7d7d2e9c9207edbad64b2d40206bab3f.tar.gz
o In pmap_install, don't prevent switching the pmap if we're
switching to kernel_pmap. The pmap is not special enough. o Clear the active bit on the pmap we're switching out. o Fix some nearby style(9) bugs. Approved by: re@
Diffstat (limited to 'sys')
-rw-r--r--sys/ia64/ia64/pmap.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c
index 2022c1a..dcb49b9 100644
--- a/sys/ia64/ia64/pmap.c
+++ b/sys/ia64/ia64/pmap.c
@@ -2557,39 +2557,37 @@ pmap_install(pmap_t pmap)
critical_enter();
oldpmap = PCPU_GET(current_pmap);
-
- if (pmap == oldpmap || pmap == kernel_pmap) {
+ if (oldpmap == pmap) {
critical_exit();
- return pmap;
+ return (oldpmap);
}
- if (oldpmap) {
- atomic_clear_32(&pmap->pm_active, PCPU_GET(cpumask));
- }
+ if (oldpmap != NULL)
+ atomic_clear_32(&oldpmap->pm_active, PCPU_GET(cpumask));
PCPU_SET(current_pmap, pmap);
- if (!pmap) {
- /*
- * RIDs 0..4 have no mappings to make sure we generate
- * page faults on accesses.
- */
+
+ if (pmap == NULL) {
+ /* Invalidate regions 0-4. */
ia64_set_rr(IA64_RR_BASE(0), (0 << 8)|(PAGE_SHIFT << 2)|1);
ia64_set_rr(IA64_RR_BASE(1), (1 << 8)|(PAGE_SHIFT << 2)|1);
ia64_set_rr(IA64_RR_BASE(2), (2 << 8)|(PAGE_SHIFT << 2)|1);
ia64_set_rr(IA64_RR_BASE(3), (3 << 8)|(PAGE_SHIFT << 2)|1);
ia64_set_rr(IA64_RR_BASE(4), (4 << 8)|(PAGE_SHIFT << 2)|1);
critical_exit();
- return oldpmap;
+ return (oldpmap);
}
atomic_set_32(&pmap->pm_active, PCPU_GET(cpumask));
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 5; i++) {
ia64_set_rr(IA64_RR_BASE(i),
- (pmap->pm_rid[i] << 8)|(PAGE_SHIFT << 2)|1);
+ (pmap->pm_rid[i] << 8)|(PAGE_SHIFT << 2)|1);
+ }
critical_exit();
- return oldpmap;
+
+ return (oldpmap);
}
vm_offset_t
OpenPOWER on IntegriCloud