summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/pmap.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-05-19 04:16:30 +0000
committermarcel <marcel@FreeBSD.org>2003-05-19 04:16:30 +0000
commitcd7086c532d7fcc9f4b3277152396924b3dea95d (patch)
tree0570d3a0fa5ef89dbacda5db8279ceacd93bdeab /sys/ia64/include/pmap.h
parent487ef7f7cbd53c22f36b29ac35905579ef1b7ae9 (diff)
downloadFreeBSD-src-cd7086c532d7fcc9f4b3277152396924b3dea95d.zip
FreeBSD-src-cd7086c532d7fcc9f4b3277152396924b3dea95d.tar.gz
pmap_install() needs to be atomic WRT to context switching. Protect
switching user regions (region 0-4) with schedlock. Avoid unnecessary recursion on schedlock by moving the core functionality to another function (pmap_switch()) where we assert schedlock is held. Turn pmap_install() into a wrapper that grabs schedlock. This minimizes the number of callsites that need to be changed. Since we already have schedlock in cpu_switch() and cpu_throw(), have them call pmap_switch() directly. These were also the only two calls to pmap_install() outside pmap.c, so make pmap_install() static and remove its prototype from pmap.h Approved by: re (blanket)
Diffstat (limited to 'sys/ia64/include/pmap.h')
-rw-r--r--sys/ia64/include/pmap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ia64/include/pmap.h b/sys/ia64/include/pmap.h
index 4ee712d..d14e4b8 100644
--- a/sys/ia64/include/pmap.h
+++ b/sys/ia64/include/pmap.h
@@ -128,7 +128,7 @@ void pmap_unmapdev(vm_offset_t, vm_size_t);
unsigned *pmap_pte(pmap_t, vm_offset_t) __pure2;
void pmap_set_opt (unsigned *);
void pmap_set_opt_bsp (void);
-struct pmap *pmap_install(struct pmap *pmap);
+struct pmap *pmap_switch(struct pmap *pmap);
#endif /* _KERNEL */
OpenPOWER on IntegriCloud