]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pmap_install() needs to be atomic WRT to context switching. Protect
authorMarcel Moolenaar <marcel@FreeBSD.org>
Mon, 19 May 2003 04:16:30 +0000 (04:16 +0000)
committerMarcel Moolenaar <marcel@FreeBSD.org>
Mon, 19 May 2003 04:16:30 +0000 (04:16 +0000)
commitdc0bde0f18fdee908e0b68669fffbbb0a9f428a8
tree0570d3a0fa5ef89dbacda5db8279ceacd93bdeab
parent4555a3de623fb4a632f434ae4fc9a19dc7bdd5f9
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)
sys/ia64/ia64/machdep.c
sys/ia64/ia64/pmap.c
sys/ia64/include/pmap.h