Skip to content

Commit b2b7cc6

Browse files
committed
Merge branch 'for-next/acpi' into for-next/core
* for-next/acpi: arm64: acpi: Honour firmware_signature field of FACS, if it exists ACPICA: Detect FACS even for hardware reduced platforms
2 parents fec50db + fbaad24 commit b2b7cc6

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

arch/arm64/kernel/acpi.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/libfdt.h>
2727
#include <linux/smp.h>
2828
#include <linux/serial_core.h>
29+
#include <linux/suspend.h>
2930
#include <linux/pgtable.h>
3031

3132
#include <acpi/ghes.h>
@@ -227,6 +228,15 @@ void __init acpi_boot_table_init(void)
227228
if (earlycon_acpi_spcr_enable)
228229
early_init_dt_scan_chosen_stdout();
229230
} else {
231+
#ifdef CONFIG_HIBERNATION
232+
struct acpi_table_header *facs = NULL;
233+
acpi_get_table(ACPI_SIG_FACS, 1, &facs);
234+
if (facs) {
235+
swsusp_hardware_signature =
236+
((struct acpi_table_facs *)facs)->hardware_signature;
237+
acpi_put_table(facs);
238+
}
239+
#endif
230240
acpi_parse_spcr(earlycon_acpi_spcr_enable, true);
231241
if (IS_ENABLED(CONFIG_ACPI_BGRT))
232242
acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);

drivers/acpi/acpica/tbfadt.c

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -315,23 +315,19 @@ void acpi_tb_parse_fadt(void)
315315
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
316316
NULL, FALSE, TRUE, &acpi_gbl_dsdt_index);
317317

318-
/* If Hardware Reduced flag is set, there is no FACS */
319-
320-
if (!acpi_gbl_reduced_hardware) {
321-
if (acpi_gbl_FADT.facs) {
322-
acpi_tb_install_standard_table((acpi_physical_address)
323-
acpi_gbl_FADT.facs,
324-
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
325-
NULL, FALSE, TRUE,
326-
&acpi_gbl_facs_index);
327-
}
328-
if (acpi_gbl_FADT.Xfacs) {
329-
acpi_tb_install_standard_table((acpi_physical_address)
330-
acpi_gbl_FADT.Xfacs,
331-
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
332-
NULL, FALSE, TRUE,
333-
&acpi_gbl_xfacs_index);
334-
}
318+
if (acpi_gbl_FADT.facs) {
319+
acpi_tb_install_standard_table((acpi_physical_address)
320+
acpi_gbl_FADT.facs,
321+
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
322+
NULL, FALSE, TRUE,
323+
&acpi_gbl_facs_index);
324+
}
325+
if (acpi_gbl_FADT.Xfacs) {
326+
acpi_tb_install_standard_table((acpi_physical_address)
327+
acpi_gbl_FADT.Xfacs,
328+
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
329+
NULL, FALSE, TRUE,
330+
&acpi_gbl_xfacs_index);
335331
}
336332
}
337333

drivers/acpi/acpica/tbutils.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@ acpi_status acpi_tb_initialize_facs(void)
3636
{
3737
struct acpi_table_facs *facs;
3838

39-
/* If Hardware Reduced flag is set, there is no FACS */
40-
41-
if (acpi_gbl_reduced_hardware) {
42-
acpi_gbl_FACS = NULL;
43-
return (AE_OK);
44-
} else if (acpi_gbl_FADT.Xfacs &&
39+
if (acpi_gbl_FADT.Xfacs &&
4540
(!acpi_gbl_FADT.facs
4641
|| !acpi_gbl_use32_bit_facs_addresses)) {
4742
(void)acpi_get_table_by_index(acpi_gbl_xfacs_index,

0 commit comments

Comments
 (0)