Commit d551d81d authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds

ACPI / PM: Call suspend_nvs_free() earlier during resume

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2d6d9fd3
...@@ -166,6 +166,7 @@ static void acpi_pm_finish(void) ...@@ -166,6 +166,7 @@ static void acpi_pm_finish(void)
u32 acpi_state = acpi_target_sleep_state; u32 acpi_state = acpi_target_sleep_state;
acpi_ec_unblock_transactions(); acpi_ec_unblock_transactions();
suspend_nvs_free();
if (acpi_state == ACPI_STATE_S0) if (acpi_state == ACPI_STATE_S0)
return; return;
...@@ -186,7 +187,6 @@ static void acpi_pm_finish(void) ...@@ -186,7 +187,6 @@ static void acpi_pm_finish(void)
*/ */
static void acpi_pm_end(void) static void acpi_pm_end(void)
{ {
suspend_nvs_free();
/* /*
* This is necessary in case acpi_pm_finish() is not called during a * This is necessary in case acpi_pm_finish() is not called during a
* failing transition to a sleep state. * failing transition to a sleep state.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment