diff options
author | 2014-07-23 14:42:33 +0800 | |
---|---|---|
committer | 2014-07-24 01:03:18 +0200 | |
commit | 821d6f0359b0614792ab8e2fb93b503e25a65079 (patch) | |
tree | bac656bc4f885f7ca7702620e57390200a874fd5 /drivers/acpi/sleep.c | |
parent | Linux 3.16-rc6 (diff) | |
download | linux-821d6f0359b0614792ab8e2fb93b503e25a65079.tar.gz linux-821d6f0359b0614792ab8e2fb93b503e25a65079.tar.bz2 linux-821d6f0359b0614792ab8e2fb93b503e25a65079.zip |
ACPI / sleep: Do not save NVS for new machines to accelerate S3
NVS region is saved and restored unconditionally for machines without
nvs_nosave quirk during S3. Tested some new machines and the operation
is not necessary. Saving NVS region also affects S2RAM speed. The time of
NVS saving and restoring depends on the size of NVS region and it consumes
7~10ms normally.
This patch is to make machines produced from 2012 to now not saving NVS region
to accelerate S3.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index b3e3cc73ba79..54da4a3fe65e 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -322,6 +322,11 @@ static struct dmi_system_id acpisleep_dmi_table[] __initdata = { static void acpi_sleep_dmi_check(void) { + int year; + + if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year >= 2012) + acpi_nvs_nosave_s3(); + dmi_check_system(acpisleep_dmi_table); } |