summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utxfinit.c
diff options
context:
space:
mode:
authorJiaqing Zhao <jiaqing.zhao@linux.intel.com>2024-08-27 04:58:20 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-29 14:40:28 +0200
commit36b531aace379f45e4ca763f7efb8d0295216e83 (patch)
tree94524c17233eb05bf4b8c2f626b00d7b9c746ec2 /drivers/acpi/acpica/utxfinit.c
parentACPICA: check null return of ACPI_ALLOCATE_ZEROED() in acpi_db_convert_to_pac... (diff)
downloadlinux-36b531aace379f45e4ca763f7efb8d0295216e83.tar.xz
linux-36b531aace379f45e4ca763f7efb8d0295216e83.zip
ACPICA: Detect FACS in reduced hardware build
According to Section 5.2.10 of ACPI Specification, FACS is optional in reduced hardware model. Enable the detection for "Hardware-reduced ACPI support only" build (CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y) also. Link: https://github.com/acpica/acpica/commit/ee53ed6b5452612bb44af542b68d605f8b2b1104 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> Link: https://patch.msgid.link/20240827025821.2099068-2-jiaqing.zhao@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utxfinit.c')
-rw-r--r--drivers/acpi/acpica/utxfinit.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index 1915bec2b279..70ae0afa7939 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -120,6 +120,18 @@ acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags)
*/
acpi_gbl_early_initialization = FALSE;
+ /*
+ * Obtain a permanent mapping for the FACS. This is required for the
+ * Global Lock and the Firmware Waking Vector
+ */
+ if (!(flags & ACPI_NO_FACS_INIT)) {
+ status = acpi_tb_initialize_facs();
+ if (ACPI_FAILURE(status)) {
+ ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
+ return_ACPI_STATUS(status);
+ }
+ }
+
#if (!ACPI_REDUCED_HARDWARE)
/* Enable ACPI mode */
@@ -138,18 +150,6 @@ acpi_status ACPI_INIT_FUNCTION acpi_enable_subsystem(u32 flags)
}
/*
- * Obtain a permanent mapping for the FACS. This is required for the
- * Global Lock and the Firmware Waking Vector
- */
- if (!(flags & ACPI_NO_FACS_INIT)) {
- status = acpi_tb_initialize_facs();
- if (ACPI_FAILURE(status)) {
- ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
- return_ACPI_STATUS(status);
- }
- }
-
- /*
* Initialize ACPI Event handling (Fixed and General Purpose)
*
* Note1: We must have the hardware and events initialized before we can