Skip to content

Commit

Permalink
Revert "ACPI: sleep: Put the FACS table after using it"
Browse files Browse the repository at this point in the history
Commit 9572223 ("ACPI: sleep: Put the FACS table after using it")
puts the FACS table during initialization.

But the hardware signature bits in the FACS table need to be accessed,
after every hibernation, to compare with the original hardware
signature.

So there is no reason to release the FACS table mapping after
initialization.

This reverts commit 9572223.

An alternative solution is to use acpi_gbl_FACS variable instead, which
is mapped by the ACPICA core and never released.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=212277
Reported-by: Stephan Hohe <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
Cc: 5.8+ <[email protected]> # 5.8+
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
zhang-rui authored and rafaeljw committed Jun 7, 2021
1 parent 614124b commit f1ffa9d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,10 +1009,8 @@ static void acpi_sleep_hibernate_setup(void)
return;

acpi_get_table(ACPI_SIG_FACS, 1, (struct acpi_table_header **)&facs);
if (facs) {
if (facs)
s4_hardware_signature = facs->hardware_signature;
acpi_put_table((struct acpi_table_header *)facs);
}
}
#else /* !CONFIG_HIBERNATION */
static inline void acpi_sleep_hibernate_setup(void) {}
Expand Down

0 comments on commit f1ffa9d

Please sign in to comment.