From patchwork Sat Feb 23 13:18:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Heinrich X-Patchwork-Id: 2178371 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A6DA1DF25A for ; Sat, 23 Feb 2013 13:20:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758955Ab3BWNUY (ORCPT ); Sat, 23 Feb 2013 08:20:24 -0500 Received: from static.52.99.9.5.clients.your-server.de ([5.9.99.52]:53793 "EHLO mail1.project-insanity.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758946Ab3BWNUX (ORCPT ); Sat, 23 Feb 2013 08:20:23 -0500 Received: from onny (onny-eee [10.25.0.6]) (Authenticated sender: onny@project-insanity.org) by mail1.project-insanity.org (Postfix) with ESMTPSA id E0DA44A04A7; Sat, 23 Feb 2013 14:22:38 +0100 (CET) Date: Sat, 23 Feb 2013 13:18:56 +0000 From: Jonas Heinrich To: "H. Peter Anvin" , len.brown@intel.com, pavel@ucw.cz, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, rjw@sisk.pl Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [Bisected] 3.7-rc1 can't resume Message-ID: <20130223131856.GA682@onny> References: <20130218155439.GA902@onny> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi, thank you for your replay and the effort you invest in helping me out with this problem. Today, I further debuged the problem and reverted this part of your commit (without understanding the actual code): I applied this change to the current 3.8 kernel and it worked! If you need more test results, just send me patches and I'll try them :) Best regards, Jonas On 02-18 08:21, H. Peter Anvin wrote: > I might be able to get my hands on a T43 later this week and see if I can reproduce this. This patch seems more plausible, at least... but still puzzling. > > Jonas Heinrich wrote: > > >On 02-17 21:40, Rafael J. Wysocki wrote: > >> Does the commit immediately preceding this one behave correctly? > >Strangely the preceding commit works well, so I bisected the kernel > >again, this time more carefully and I've got a different result! > >(see bisect_log attachement). > >It seems to be commit 73201dbec64aebf6b0dca855b523f437972dc7bb > >(https://patchwork.kernel.org/patch/1511921/). > >Someone on LKML already reported an issue with this commit > >(https://lkml.org/lkml/2012/10/18/228) , but Peter > >Anvins patch got already applied in newer versions. > >Reverting this patch with the recent git clone seems to be difficult > >because it already has too much dependencies. > > > >Additionally I've included dmesg dumps of the last good and the bad > >kernel version. > > > >On 02-17 12:52, H. Peter Anvin wrote: > >> T43 is quite old... which might have exposed unique bugs. How > >reliable is the failure? Even one misidentified commit results in git > >bisect giving garbage. > >It affects really all versions after that commit and the failure > >happens > >every time I try to resume my notebook. > > > >Best regards, > >Jonas > > -- > Sent from my mobile phone. Please excuse brevity and lack of formatting. diff --git a/arch/x86/realmode/rm/wakeup_asm.S b/arch/x86/realmode/rm/wakeup_asm.S index 8905166..e56479e 100644 --- a/arch/x86/realmode/rm/wakeup_asm.S +++ b/arch/x86/realmode/rm/wakeup_asm.S @@ -110,15 +119,15 @@ ENTRY(wakeup_start) movl pmode_cr3, %eax movl %eax, %cr3 - movl pmode_cr4, %ecx - jecxz 1f - movl %ecx, %cr4 + btl $WAKEUP_BEHAVIOR_RESTORE_CR4, %edi + jz 1f + movl pmode_cr4, %eax + movl %eax, %cr4 1: + btl $WAKEUP_BEHAVIOR_RESTORE_EFER, %edi + jz 1f movl pmode_efer, %eax movl pmode_efer + 4, %edx - movl %eax, %ecx - orl %edx, %ecx - jz 1f movl $MSR_EFER, %ecx wrmsr 1: