Commit d551d81d6a720542873f478def60baab6b5df403

Authored by Rafael J. Wysocki
Committed by Linus Torvalds
1 parent 2d6d9fd3a5

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: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/acpi/sleep.c
... ... @@ -166,6 +166,7 @@
166 166 u32 acpi_state = acpi_target_sleep_state;
167 167  
168 168 acpi_ec_unblock_transactions();
  169 + suspend_nvs_free();
169 170  
170 171 if (acpi_state == ACPI_STATE_S0)
171 172 return;
... ... @@ -186,7 +187,6 @@
186 187 */
187 188 static void acpi_pm_end(void)
188 189 {
189   - suspend_nvs_free();
190 190 /*
191 191 * This is necessary in case acpi_pm_finish() is not called during a
192 192 * failing transition to a sleep state.