Skip to content

Commit 45d88df

Browse files
chenhuacaigregkh
authored andcommitted
ACPICA: Allow to skip Global Lock initialization
commit feb8ae81b2378b75a99c81d315602ac8918ed382 upstream. 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: acpica/acpica@463cb0fe Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Cc: Huacai Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a3e0398 commit 45d88df

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/acpi/acpica/evglock.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ acpi_status acpi_ev_init_global_lock_handler(void)
4242
return_ACPI_STATUS(AE_OK);
4343
}
4444

45+
if (!acpi_gbl_use_global_lock) {
46+
return_ACPI_STATUS(AE_OK);
47+
}
48+
4549
/* Attempt installation of the global lock handler */
4650

4751
status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL,

include/acpi/acpixf.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
213213
*/
214214
ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
215215

216+
/*
217+
* ACPI Global Lock is mainly used for systems with SMM, so no-SMM systems
218+
* (such as loong_arch) may not have and not use Global Lock.
219+
*/
220+
ACPI_INIT_GLOBAL(u8, acpi_gbl_use_global_lock, TRUE);
221+
216222
/*
217223
* Maximum timeout for While() loop iterations before forced method abort.
218224
* This mechanism is intended to prevent infinite loops during interpreter

0 commit comments

Comments
 (0)