public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Jeff Chua <jeff.chua.linux@gmail.com>
Cc: Len Brown <len.brown@intel.com>,
	linux-pm@lists.linux-foundation.org,
	Jack Steiner <steiner@sgi.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: [2/2] ACPI / PM: Call suspend_nvs_free() earlier during resume
Date: Wed, 19 Jan 2011 22:27:55 +0100	[thread overview]
Message-ID: <201101192227.55298.rjw@sisk.pl> (raw)
In-Reply-To: <201101192219.07569.rjw@sisk.pl>

From: Rafael J. Wysocki <rjw@sisk.pl>

It turns out that some device drivers map pages from the ACPI NVS
region during resume using ioremap(), which conflicts with
ioremap_cache() used for mapping those pages by the NVS save/restore
code in nvs.c.

Make the NVS pages mapped by the code in nvs.c be unmapped before
device drivers' resume routines run.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/sleep.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/acpi/sleep.c
===================================================================
--- linux-2.6.orig/drivers/acpi/sleep.c
+++ linux-2.6/drivers/acpi/sleep.c
@@ -166,6 +166,7 @@ static void acpi_pm_finish(void)
 	u32 acpi_state = acpi_target_sleep_state;
 
 	acpi_ec_unblock_transactions();
+	suspend_nvs_free();
 
 	if (acpi_state == ACPI_STATE_S0)
 		return;
@@ -186,7 +187,6 @@ static void acpi_pm_finish(void)
  */
 static void acpi_pm_end(void)
 {
-	suspend_nvs_free();
 	/*
 	 * This is necessary in case acpi_pm_finish() is not called during a
 	 * failing transition to a sleep state.


  parent reply	other threads:[~2011-01-19 21:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTimBEnKTuR5aQyXvpZX8grQPw1eCaVgP-k9yBXhv@mail.gmail.com>
2011-01-17 18:55 ` Resume from Memory very slow on 2.6.37+ Brown, Len
2011-01-17 22:49 ` Rafael J. Wysocki
2011-01-18  0:14   ` [linux-pm] " Rafael J. Wysocki
2011-01-18  1:14     ` Jeff Chua
2011-01-18  1:35       ` Rafael J. Wysocki
2011-01-18  5:19         ` Jeff Chua
2011-01-18 20:20           ` Rafael J. Wysocki
2011-01-19  1:20             ` Jeff Chua
2011-01-19  1:38               ` Rafael J. Wysocki
2011-01-19 14:13                 ` Jeff Chua
2011-01-19 21:19                   ` Rafael J. Wysocki
2011-01-19 21:27                     ` [1/2] ACPI: Introduce acpi_os_ioremap() Rafael J. Wysocki
2011-01-19 21:27                     ` Rafael J. Wysocki [this message]
2011-01-20  1:21                     ` [linux-pm] Resume from Memory very slow on 2.6.37+ Jeff Chua
2011-01-20  1:50                       ` Rafael J. Wysocki

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=201101192227.55298.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=jeff.chua.linux@gmail.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=steiner@sgi.com \
    --cc=torvalds@linux-foundation.org \
    /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