Fix ACPI suspend/resume on amd64, which was broken since r208833.

We need actual storage for FPU state to save and restore.
This commit is contained in:
Jung-uk Kim 2010-06-14 20:08:26 +00:00
parent 9ee2165f5d
commit c977e11721
2 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
cr3 = rcr3();
load_cr3(KPML4phys);
stopfpu = stopxpcbs[0]->xpcb_pcb.pcb_save;
stopfpu = &stopxpcbs[0]->xpcb_pcb.pcb_user_save;
if (acpi_savecpu(stopxpcbs[0])) {
fpugetregs(curthread, stopfpu);

View File

@ -1247,7 +1247,7 @@ cpususpend_handler(void)
rf = intr_disable();
cr3 = rcr3();
stopfpu = stopxpcbs[cpu]->xpcb_pcb.pcb_save;
stopfpu = &stopxpcbs[cpu]->xpcb_pcb.pcb_user_save;
if (savectx2(stopxpcbs[cpu])) {
fpugetregs(curthread, stopfpu);
wbinvd();