Disable interrupts after using pmap_enter() to add the identity mapping.

Since pmap_enter() calls pmap_invalidate_page(), which needs interrupts
enabled in the SMP case, we defer the disable to right before saving the
register context.  This has been incorrect for about a year but caused no
real problems because the identity page never actually replaces a previously
mapped page and suspend/resume on SMP systems has been uncommon.

Tested by:	sos
MFC after:	3 days
This commit is contained in:
Nate Lawson 2004-08-19 18:48:17 +00:00
parent 50ab727669
commit d3bdd24ea9

View File

@ -189,7 +189,6 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
AcpiSetFirmwareWakingVector(sc->acpi_wakephys);
ef = read_eflags();
ACPI_DISABLE_IRQS();
/* Create Identity Mapping */
if ((p = curproc) == NULL)
@ -207,6 +206,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE, 1);
ret_addr = 0;
ACPI_DISABLE_IRQS();
if (acpi_savecpu()) {
/* Execute Sleep */
intr_suspend();