Make peter's commit compatible with interrupt-enabled critical_enter()

and exit(), which has already solved the problem in regards to deadlocked
IPI's.
This commit is contained in:
Matthew Dillon 2002-02-26 18:08:54 +00:00
parent 521393ea56
commit 24e68cb0bc
2 changed files with 4 additions and 4 deletions

View File

@ -575,7 +575,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va)
* interrupts disabled here.
* XXX we may need to hold schedlock to get a coherent pm_active
*/
if (td->td_critnest == 1)
if (td->td_critnest == 1 && td->td_savecrit != (critical_t)-1)
cpu_critical_exit(td->td_savecrit);
if (pmap->pm_active == -1 || pmap->pm_active == all_cpus) {
invlpg(va); /* global */
@ -609,7 +609,7 @@ pmap_invalidate_all(pmap_t pmap)
* interrupts disabled here.
* XXX we may need to hold schedlock to get a coherent pm_active
*/
if (td->td_critnest == 1)
if (td->td_critnest == 1 && td->td_savecrit != (critical_t)-1)
cpu_critical_exit(td->td_savecrit);
if (pmap->pm_active == -1 || pmap->pm_active == all_cpus) {
invltlb(); /* global */

View File

@ -575,7 +575,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va)
* interrupts disabled here.
* XXX we may need to hold schedlock to get a coherent pm_active
*/
if (td->td_critnest == 1)
if (td->td_critnest == 1 && td->td_savecrit != (critical_t)-1)
cpu_critical_exit(td->td_savecrit);
if (pmap->pm_active == -1 || pmap->pm_active == all_cpus) {
invlpg(va); /* global */
@ -609,7 +609,7 @@ pmap_invalidate_all(pmap_t pmap)
* interrupts disabled here.
* XXX we may need to hold schedlock to get a coherent pm_active
*/
if (td->td_critnest == 1)
if (td->td_critnest == 1 && td->td_savecrit != (critical_t)-1)
cpu_critical_exit(td->td_savecrit);
if (pmap->pm_active == -1 || pmap->pm_active == all_cpus) {
invltlb(); /* global */