diff options
author | kib <kib@FreeBSD.org> | 2010-07-09 20:05:56 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-07-09 20:05:56 +0000 |
commit | 5e9badadafc232a66f795183716dc2ec221a1038 (patch) | |
tree | b4ff0d315f57ea5cc351fd958106a75e3a3d98dc /sys/i386 | |
parent | 7c09dc242c035943fb8ed54909fd0a8461cb99ba (diff) | |
download | FreeBSD-src-5e9badadafc232a66f795183716dc2ec221a1038.zip FreeBSD-src-5e9badadafc232a66f795183716dc2ec221a1038.tar.gz |
For both i386 and amd64 pmap,
- change the type of pm_active to cpumask_t, which it is;
- in pmap_remove_pages(), compare with PCPU(curpmap), instead of
dereferencing the long chain of pointers [1].
For amd64 pmap, remove the unneeded checks for validity of curpmap
in pmap_activate(), since curpmap should be always valid after
r209789.
Submitted by: alc [1]
Reviewed by: alc
MFC after: 3 weeks
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/pmap.c | 2 | ||||
-rw-r--r-- | sys/i386/include/pmap.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 40db574..75c5f8f 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -4180,7 +4180,7 @@ pmap_remove_pages(pmap_t pmap) uint32_t inuse, bitmask; int allfree; - if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { + if (pmap != PCPU_GET(curpmap)) { printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index f45a9df..df73e88 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -417,7 +417,7 @@ struct pmap { struct mtx pm_mtx; pd_entry_t *pm_pdir; /* KVA of page directory */ TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ - u_int pm_active; /* active on cpus */ + cpumask_t pm_active; /* active on cpus */ struct pmap_statistics pm_stats; /* pmap statistics */ LIST_ENTRY(pmap) pm_list; /* List of all pmaps */ uint32_t pm_gen_count; /* generation count (pmap lock dropped) */ |