Re: regression suspend/resume on Lenovo T420

From: Jonathan Anderson <jonathan_at_FreeBSD.org>
Date: Mon, 15 May 2017 14:37:16 -0230
On 15 May 2017, at 7:26, Konstantin Belousov wrote:
>
> Try this.  If it works, I will write a proper patch.
>
> diff --git a/sys/amd64/amd64/cpu_switch.S 
> b/sys/amd64/amd64/cpu_switch.S
> index 33437ad16e6..9c0cd05ebea 100644
> --- a/sys/amd64/amd64/cpu_switch.S
> +++ b/sys/amd64/amd64/cpu_switch.S
> _at__at_ -369,6 +369,11 _at__at_ END(savectx)
>   * Resuming processor state from pcb.
>   */
>  ENTRY(resumectx)
> +	movl	$MSR_EFER,%ecx
> +	rdmsr
> +	orl	$EFER_NXE,%eax
> +	wrmsr
> +
>  	/* Switch to KPML4phys. */
>  	movq	KPML4phys,%rax
>  	movq	%rax,%cr3

Running drm-next (which has -CURRENT last merged somewhere around 
r317651), this patch fixes one of the two problems I've been 
experiencing with suspend/resume. Definite progress. :)

Thanks!


Jon
--
Jonathan Anderson
jonathan_at_FreeBSD.org
Received on Mon May 15 2017 - 15:07:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:11 UTC