mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alexey Starikovskiy" <aystarik@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Tobias Diedrich" <ranma+kernel@tdiedrich.de>,
	"pm list" <linux-pm@lists.linux-foundation.org>,
	"Pavel Machek" <pavel@ucw.cz>, "Marcus Better" <marcus@better.se>
Subject: Re: [linux-pm] [RFT][PATCH] swsusp: Change code ordering related to ACPI
Date: Fri, 4 May 2007 22:36:41 +0400	[thread overview]
Message-ID: <8f8ff01d0705041136r18315079w13f95dc3c627a53b@mail.gmail.com> (raw)
In-Reply-To: <200705041143.02451.rjw@sisk.pl>

Doing _WAK (from pm_finish) before device_resume will brake almost all
ACPI devices.

Regards,
Alex.

On 5/4/07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> Hi,
>
> The change of the hibernation/suspend code ordering made before 2.6.21 has
> caused some systems to have problems related to ACPI.  In particular, the
> 'platform' hibernation mode doesn't work any more on some systems.
>
> It has been confirmed that the appended patch fixes the problem, but it's not
> certain if this changes don't break some other systems.  For this reason, all
> users of hibernation (swsusp, uswsusp) are gently requested to verify if this
> patch doesn't break their systems.
>
> Greetings,
> Rafael
>
> ---
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> The current code ordering in the hibernation code paths causes some systems to
> have problems.  It has been confirmed by testers that these problems do not
> appear if the acpi_pm_finish() function (called via platform_finish()) is
> executed after device_suspend().
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  kernel/power/disk.c |    4 ++--
>  kernel/power/user.c |    8 ++++----
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> Index: linux-2.6.21/kernel/power/disk.c
> ===================================================================
> --- linux-2.6.21.orig/kernel/power/disk.c       2007-05-04 10:31:51.000000000 +0200
> +++ linux-2.6.21/kernel/power/disk.c    2007-05-04 10:32:12.000000000 +0200
> @@ -195,9 +195,9 @@ int hibernate(void)
>
>         if (in_suspend) {
>                 enable_nonboot_cpus();
> -               platform_finish();
>                 device_resume();
>                 resume_console();
> +               platform_finish();
>                 pr_debug("PM: writing image.\n");
>                 error = swsusp_write();
>                 if (!error)
> @@ -214,9 +214,9 @@ int hibernate(void)
>   Enable_cpus:
>         enable_nonboot_cpus();
>   Resume_devices:
> -       platform_finish();
>         device_resume();
>         resume_console();
> +       platform_finish();
>   Thaw:
>         mutex_unlock(&pm_mutex);
>         unprepare_processes();
> Index: linux-2.6.21/kernel/power/user.c
> ===================================================================
> --- linux-2.6.21.orig/kernel/power/user.c       2007-05-04 10:31:51.000000000 +0200
> +++ linux-2.6.21/kernel/power/user.c    2007-05-04 10:32:12.000000000 +0200
> @@ -169,11 +169,11 @@ static inline int snapshot_suspend(int p
>         }
>         enable_nonboot_cpus();
>   Resume_devices:
> +       device_resume();
> +       resume_console();
>         if (platform_suspend)
>                 platform_finish();
>
> -       device_resume();
> -       resume_console();
>   Finish:
>         mutex_unlock(&pm_mutex);
>         return error;
> @@ -201,11 +201,11 @@ static inline int snapshot_restore(int p
>
>         enable_nonboot_cpus();
>   Resume_devices:
> +       device_resume();
> +       resume_console();
>         if (platform_suspend)
>                 platform_finish();
>
> -       device_resume();
> -       resume_console();
>   Finish:
>         pm_restore_console();
>         mutex_unlock(&pm_mutex);
> _______________________________________________
> linux-pm mailing list
> linux-pm@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/linux-pm
>

  reply	other threads:[~2007-05-04 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-04  9:43 Rafael J. Wysocki
2007-05-04 18:36 ` Alexey Starikovskiy [this message]
2007-05-04 18:37   ` [linux-pm] " Alexey Starikovskiy
2007-05-04 19:43     ` Rafael J. Wysocki
2007-05-04 23:11 ` Ray Lee
2007-05-05  9:50   ` Rafael J. Wysocki
2007-05-05 20:46     ` Ray Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f8ff01d0705041136r18315079w13f95dc3c627a53b@mail.gmail.com \
    --to=aystarik@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=marcus@better.se \
    --cc=pavel@ucw.cz \
    --cc=ranma+kernel@tdiedrich.de \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®