Module Name: src
Committed By: martin
Date: Tue Aug 1 15:35:38 UTC 2023
Modified Files:
src/sys/dev/acpi/acpica [netbsd-10]: acpi_func.h
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #290):
sys/dev/acpi/acpica/acpi_func.h: revision 1.7
acpi(4): Fix membars in ACPI_ACQUIRE/RELEASE_GLOBAL_LOCK.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.30.1 src/sys/dev/acpi/acpica/acpi_func.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/acpi/acpica/acpi_func.h
diff -u src/sys/dev/acpi/acpica/acpi_func.h:1.6 src/sys/dev/acpi/acpica/acpi_func.h:1.6.30.1
--- src/sys/dev/acpi/acpica/acpi_func.h:1.6 Fri Oct 12 21:36:24 2018
+++ src/sys/dev/acpi/acpica/acpi_func.h Tue Aug 1 15:35:38 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_func.h,v 1.6 2018/10/12 21:36:24 jmcneill Exp $ */
+/* $NetBSD: acpi_func.h,v 1.6.30.1 2023/08/01 15:35:38 martin Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -62,6 +62,7 @@ acpi_acquire_global_lock(uint32_t *lock)
((old >> 1) & GL_BIT_PENDING);
val = atomic_cas_32(lock, old, new);
} while (__predict_false(val != old));
+ membar_acquire();
return ((new < GL_BIT_MASK) ? GL_ACQUIRED : GL_BUSY);
}
@@ -71,6 +72,7 @@ acpi_release_global_lock(uint32_t *lock)
{
uint32_t new, old, val;
+ membar_release();
do {
old = *lock;
new = old & ~GL_BIT_MASK;