From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752596AbdLKJ3v (ORCPT ); Mon, 11 Dec 2017 04:29:51 -0500 Received: from mga03.intel.com ([134.134.136.65]:51291 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbdLKJ3u (ORCPT ); Mon, 11 Dec 2017 04:29:50 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,391,1508828400"; d="scan'208";a="487922" Subject: Re: [PATCH] Fix resume on x86-32 machines To: Pavel Machek , Andy Lutomirski Cc: Linus Torvalds , Zhang Rui , Andrew Lutomirski , Thomas Gleixner , "Rafael J. Wysocki" , Linux Kernel Mailing List , the arch/x86 maintainers References: <20171209103325.GA13867@amd> <20171209220110.GA11496@amd> <20171210162305.GA10159@amd> <20171210185638.GA10363@amd> <20171210213804.GA4660@amd> <76028A95-1CE1-49AA-9929-9C15FFC520EB@amacapital.net> <20171210222049.GA6587@amd> From: Jarkko Nikula Message-ID: <1a34404c-9634-34ff-a32b-81970aa79e63@linux.intel.com> Date: Mon, 11 Dec 2017 11:25:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171210222049.GA6587@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/11/2017 12:20 AM, Pavel Machek wrote: > On Sun 2017-12-10 13:58:23, Andy Lutomirski wrote: >>> On Dec 10, 2017, at 1:38 PM, Pavel Machek wrote: >>> >>> >>> After 4.15-rc2, suspend stopped working on Thinkpad X60. 5b06bbc >>> (unintentionally?) reordered stuff with respect to >>> fix_processor_context() on 32-bit and 64-bit. We undo that change on >>> 32-bit. >>> >> >> Can you explain what was wrong with the reordering? Your patch certainly *looks* incorrect. >> > > No, I can't, sorry. > >> I'm guessing that the real issue is that 32-bit needs %fs restored >> early for TLS. > > Maybe. I can test patches... > > I don't think it would be good idea to revert > 5b06bbcfc2c621da3009da8decb7511500c293ed, but since it introduced > regression in -rc2, I believe we should fix the regression now, and > then we can try to provide cleaner solution. > I can confirm Pavel's findings. Commit 5b06bbcfc2c6 ("x86/power: Fix some ordering bugs in __restore_processor_context()") broke the suspend/resume on 32-bit kernel. v4.15-rc3 works either by reverting the commit or by Pavel's patch. Fortunately Pavel's patch still keeps the 64-bit suspend/resume ok. -- Jarkko