ACPICA: Detect FACS even for hardware reduced platforms
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 11 Mar 2024 12:19:14 +0000 (12:19 +0000)
committerWill Deacon <will@kernel.org>
Thu, 18 Apr 2024 15:17:33 +0000 (16:17 +0100)
ACPICA commit 44fc328a1a14b097d92b8be83989e4bf69b6e6cb

The FACS is optional even on hardware reduced platforms, and may exist
for the purpose of communicating the hardware_signature field to provoke
a clean reboot instead of a resume from hibernation.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20240412073530.2222496-2-dwmw2@infradead.org
Signed-off-by: Will Deacon <will@kernel.org>
drivers/acpi/acpica/tbfadt.c
drivers/acpi/acpica/tbutils.c

index 44267a92bce5e2f586ae7e0aeb73a360a9090a1b..3c126c6d306b06446af06e5cb9f0c837a11896e7 100644 (file)
@@ -315,23 +315,19 @@ void acpi_tb_parse_fadt(void)
                                       ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
                                       NULL, FALSE, TRUE, &acpi_gbl_dsdt_index);
 
-       /* If Hardware Reduced flag is set, there is no FACS */
-
-       if (!acpi_gbl_reduced_hardware) {
-               if (acpi_gbl_FADT.facs) {
-                       acpi_tb_install_standard_table((acpi_physical_address)
-                                                      acpi_gbl_FADT.facs,
-                                                      ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
-                                                      NULL, FALSE, TRUE,
-                                                      &acpi_gbl_facs_index);
-               }
-               if (acpi_gbl_FADT.Xfacs) {
-                       acpi_tb_install_standard_table((acpi_physical_address)
-                                                      acpi_gbl_FADT.Xfacs,
-                                                      ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
-                                                      NULL, FALSE, TRUE,
-                                                      &acpi_gbl_xfacs_index);
-               }
+       if (acpi_gbl_FADT.facs) {
+               acpi_tb_install_standard_table((acpi_physical_address)
+                                              acpi_gbl_FADT.facs,
+                                              ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
+                                              NULL, FALSE, TRUE,
+                                              &acpi_gbl_facs_index);
+       }
+       if (acpi_gbl_FADT.Xfacs) {
+               acpi_tb_install_standard_table((acpi_physical_address)
+                                              acpi_gbl_FADT.Xfacs,
+                                              ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
+                                              NULL, FALSE, TRUE,
+                                              &acpi_gbl_xfacs_index);
        }
 }
 
index bb4a56e5673a5f71ec3157b3919d30962013f0f2..15fa68a5ea6e25b7160bbf40b8c085bf3aa865b2 100644 (file)
@@ -36,12 +36,7 @@ acpi_status acpi_tb_initialize_facs(void)
 {
        struct acpi_table_facs *facs;
 
-       /* If Hardware Reduced flag is set, there is no FACS */
-
-       if (acpi_gbl_reduced_hardware) {
-               acpi_gbl_FACS = NULL;
-               return (AE_OK);
-       } else if (acpi_gbl_FADT.Xfacs &&
+       if (acpi_gbl_FADT.Xfacs &&
                   (!acpi_gbl_FADT.facs
                    || !acpi_gbl_use32_bit_facs_addresses)) {
                (void)acpi_get_table_by_index(acpi_gbl_xfacs_index,