On Sat, Feb 12, 2011 at 04:16:19AM +0200, Paul Irofti wrote:
> On Sat, Feb 12, 2011 at 03:33:35AM +0200, Paul Irofti wrote:
> > Please everyone test the following diff even if video reposting *works*
> > for you at the moment. And everyone with a non-working video reposting
> > card that *isn't* nvidia contact me!
> > 
> > AGAIN! If suspend/resume doesn't work for you and its not NVIDIA, contact 
> > me!
> 
> New diff including the amd64 bits which I missed in the former mail.
> Also remove wbinvd() call and comment what this is trying to accomplish.
> 
> Test on all machines, working or not! Nvidia is a don't care case.

It seems that this diff breaks amd64 suspend/resume. I'll be back with
another one sometime soon.

Thanks to everyone that tested!

> 
> Index: arch/i386/i386/acpi_machdep.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/i386/i386/acpi_machdep.c,v
> retrieving revision 1.41
> diff -u -p -r1.41 acpi_machdep.c
> --- arch/i386/i386/acpi_machdep.c     6 Oct 2010 18:21:09 -0000       1.41
> +++ arch/i386/i386/acpi_machdep.c     12 Feb 2011 02:07:30 -0000
> @@ -251,6 +251,13 @@ acpi_sleep_machdep(struct acpi_softc *sc
>       if (sc->sc_facs->length > 32 && sc->sc_facs->version >= 1)
>               sc->sc_facs->x_wakeup_vector = 0;
>  
> +     /* 
> +      * Synchronize the trampoline since we may have changed some 
> +      * variables in it from the vga_pci quirks table.
> +      */
> +     bcopy(acpi_real_mode_resume, (caddr_t)ACPI_TRAMPOLINE,
> +         acpi_resume_end - acpi_real_mode_resume);
> +
>       /* Copy the current cpu registers into a safe place for resume.
>        * acpi_savecpu actually returns twice - once in the suspend
>        * path and once in the resume path (see setjmp(3)).
> Index: arch/amd64/amd64/acpi_machdep.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/amd64/acpi_machdep.c,v
> retrieving revision 1.47
> diff -u -p -r1.47 acpi_machdep.c
> --- arch/amd64/amd64/acpi_machdep.c   13 Nov 2010 04:16:42 -0000      1.47
> +++ arch/amd64/amd64/acpi_machdep.c   12 Feb 2011 02:07:30 -0000
> @@ -225,6 +225,13 @@ acpi_sleep_machdep(struct acpi_softc *sc
>       if (sc->sc_facs->length > 32 && sc->sc_facs->version >= 1)
>               sc->sc_facs->x_wakeup_vector = 0;
>  
> +     /* 
> +      * Synchronize the trampoline since we may have changed some 
> +      * variables in it from the vga_pci quirks table.
> +      */
> +     bcopy(acpi_real_mode_resume, (caddr_t)ACPI_TRAMPOLINE,
> +         acpi_resume_end - acpi_real_mode_resume);
> +
>       /* Copy the current cpu registers into a safe place for resume.
>        * acpi_savecpu actually returns twice - once in the suspend
>        * path and once in the resume path (see setjmp(3)).

Reply via email to