Skip to content

Commit

Permalink
ACPI / sleep: Do not save NVS for new machines to accelerate S3
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lan Tianyu authored and Rafael J. Wysocki committed Jul 23, 2014
1 parent 9a3c414 commit 821d6f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 821d6f0

Please sign in to comment.