]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ACPICA: Allow to skip Global Lock initialization
authorHuacai Chen <chenhuacai@loongson.cn>
Fri, 12 Sep 2025 19:54:53 +0000 (21:54 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Sep 2025 10:20:12 +0000 (12:20 +0200)
Introduce acpi_gbl_use_global_lock, which allows to skip the Global Lock
initialization. This is useful for systems without Global Lock (such as
loong_arch), so as to avoid error messages during boot phase:

 ACPI Error: Could not enable global_lock event (20240827/evxfevnt-182)
 ACPI Error: No response from Global Lock hardware, disabling lock (20240827/evglock-59)

Link: https://github.com/acpica/acpica/commit/463cb0fe
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/evglock.c
include/acpi/acpixf.h

index fa3e0d00d1ca96261d7de937b642308a00973883..df2a4ab0e0da9d6598b2b25b661536b693df64b4 100644 (file)
@@ -42,6 +42,10 @@ acpi_status acpi_ev_init_global_lock_handler(void)
                return_ACPI_STATUS(AE_OK);
        }
 
+       if (!acpi_gbl_use_global_lock) {
+               return_ACPI_STATUS(AE_OK);
+       }
+
        /* Attempt installation of the global lock handler */
 
        status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL,
index b49396aa4058126fb4f27213cfbe835cc55adb7c..97c25ae8a36e3d1a903309ec79586d419ac9383d 100644 (file)
@@ -213,6 +213,12 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
  */
 ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
 
+/*
+ * ACPI Global Lock is mainly used for systems with SMM, so no-SMM systems
+ * (such as loong_arch) may not have and not use Global Lock.
+ */
+ACPI_INIT_GLOBAL(u8, acpi_gbl_use_global_lock, TRUE);
+
 /*
  * Maximum timeout for While() loop iterations before forced method abort.
  * This mechanism is intended to prevent infinite loops during interpreter