diff options
author | Zhang Rui <rui.zhang@intel.com> | 2017-04-04 15:32:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-12 06:41:21 -0400 |
commit | 3d2f06d8d180f288ae79d8bd2eb7eee5e2599f31 (patch) | |
tree | c9f2d93b93dc0a98235b6080789e70a776f95c48 | |
parent | 09f78f116c03d9ffc06bdbf5930228313d9b5d5e (diff) |
ACPI: save NVS memory for Lenovo G50-45
[ Upstream commit cbc00c1310d34139a63946482b40a6b261a03fb9 ]
In commit 821d6f0359b0 (ACPI / sleep: Do not save NVS for new machines to
accelerate S3), to optimize S3 suspend/resume speed, code is introduced
to ignore NVS memory saving during S3 for all the platforms later than
2012.
But, Lenovo G50-45, a platform released in 2015, still needs NVS memory
saving during S3. A quirk is introduced for this platform.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=189431
Tested-by: Przemek <soprwa@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[ rjw: Drop unnecessary code ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/acpi/sleep.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 54abb26b7366..a4327af676fe 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -130,6 +130,12 @@ void __init acpi_nvs_nosave_s3(void) | |||
130 | nvs_nosave_s3 = true; | 130 | nvs_nosave_s3 = true; |
131 | } | 131 | } |
132 | 132 | ||
133 | static int __init init_nvs_save_s3(const struct dmi_system_id *d) | ||
134 | { | ||
135 | nvs_nosave_s3 = false; | ||
136 | return 0; | ||
137 | } | ||
138 | |||
133 | /* | 139 | /* |
134 | * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the | 140 | * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the |
135 | * user to request that behavior by using the 'acpi_old_suspend_ordering' | 141 | * user to request that behavior by using the 'acpi_old_suspend_ordering' |
@@ -324,6 +330,19 @@ static struct dmi_system_id acpisleep_dmi_table[] __initdata = { | |||
324 | DMI_MATCH(DMI_PRODUCT_NAME, "K54HR"), | 330 | DMI_MATCH(DMI_PRODUCT_NAME, "K54HR"), |
325 | }, | 331 | }, |
326 | }, | 332 | }, |
333 | /* | ||
334 | * https://bugzilla.kernel.org/show_bug.cgi?id=189431 | ||
335 | * Lenovo G50-45 is a platform later than 2012, but needs nvs memory | ||
336 | * saving during S3. | ||
337 | */ | ||
338 | { | ||
339 | .callback = init_nvs_save_s3, | ||
340 | .ident = "Lenovo G50-45", | ||
341 | .matches = { | ||
342 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | ||
343 | DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), | ||
344 | }, | ||
345 | }, | ||
327 | {}, | 346 | {}, |
328 | }; | 347 | }; |
329 | 348 | ||