Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi/acpica acpi(4): Fix membars in ACPI_ACQUIRE/REL...



details:   https://anonhg.NetBSD.org/src/rev/4818feac75ef
branches:  trunk
changeset: 374711:4818feac75ef
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed May 10 01:23:27 2023 +0000

description:
acpi(4): Fix membars in ACPI_ACQUIRE/RELEASE_GLOBAL_LOCK.

XXX pullup-8 (by patch with membar_enter/exit)
XXX pullup-9 (by patch with membar_enter/exit)
XXX pullup-10

diffstat:

 sys/dev/acpi/acpica/acpi_func.h |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 6f346c934fa8 -r 4818feac75ef sys/dev/acpi/acpica/acpi_func.h
--- a/sys/dev/acpi/acpica/acpi_func.h   Wed May 10 00:49:17 2023 +0000
+++ b/sys/dev/acpi/acpica/acpi_func.h   Wed May 10 01:23:27 2023 +0000
@@ -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.7 2023/05/10 01:23:27 riastradh 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;



Home | Main Index | Thread Index | Old Index