Re: [PATCH] Fix resume on x86-32 machines

From: Jarkko Nikula
Date: Mon Dec 11 2017 - 04:29:54 EST


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 <pavel@xxxxxx> 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