From d21705bcc1c27c7b99fbd88bf6cb34a58add4666 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 17 Apr 2010 13:43:24 +0300 Subject: [PATCH] Fix ACPI global lock acquisition in x86_64. This fixes a number of grave issues on my Sony VAIO VGN-Z51XG, such as messages about not being able to acquire the global lock, freezes when ACPI was fully enabled and a panic at shutdown. BTW, gcc had been warning us about it for a long time. :) In-collaboration-with: aggelos --- sys/platform/pc64/include/acpica_machdep.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/platform/pc64/include/acpica_machdep.h b/sys/platform/pc64/include/acpica_machdep.h index 5a481a1629..11ba221676 100644 --- a/sys/platform/pc64/include/acpica_machdep.h +++ b/sys/platform/pc64/include/acpica_machdep.h @@ -63,11 +63,11 @@ /* Section 5.2.9.1: global lock acquire/release functions */ extern int acpi_acquire_global_lock(uint32_t *lock); extern int acpi_release_global_lock(uint32_t *lock); -#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ - ((Acq) = acpi_acquire_global_lock(GLptr)) -#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ - ((Acq) = acpi_release_global_lock(GLptr)) - +#define ACPI_ACQUIRE_GLOBAL_LOCK(FACSptr, Acq) \ + ((Acq) = acpi_acquire_global_lock(&(FACSptr)->GlobalLock)) +#define ACPI_RELEASE_GLOBAL_LOCK(FACSptr, Acq) \ + ((Acq) = acpi_release_global_lock(&(FACSptr)->GlobalLock)) + #endif /* _KERNEL */ #define ACPI_MACHINE_WIDTH 64 -- 2.41.0