Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/include vax: __cpu_simple_lock audit.



details:   https://anonhg.NetBSD.org/src/rev/3991869f66c9
branches:  trunk
changeset: 361544:3991869f66c9
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Feb 13 13:42:21 2022 +0000

description:
vax: __cpu_simple_lock audit.

Fix missing "memory" asm clobber so the compiler can't reorder memory
access around __cpu_simple_lock/lock_try/unlock.

diffstat:

 sys/arch/vax/include/lock.h |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 9dea4f5bba58 -r 3991869f66c9 sys/arch/vax/include/lock.h
--- a/sys/arch/vax/include/lock.h       Sun Feb 13 13:42:12 2022 +0000
+++ b/sys/arch/vax/include/lock.h       Sun Feb 13 13:42:21 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lock.h,v 1.33 2022/02/12 17:17:53 riastradh Exp $      */
+/*     $NetBSD: lock.h,v 1.34 2022/02/13 13:42:21 riastradh Exp $      */
 
 /*
  * Copyright (c) 2000 Ludd, University of Lule}, Sweden.
@@ -84,7 +84,7 @@
        __asm __volatile ("clrl %0;bbssi $0,%1,1f;incl %0;1:"
                : "=&r"(ret)
                : "m"(*__alp)
-               : "cc");
+               : "cc", "memory");
 #endif
 
        return ret;
@@ -107,7 +107,7 @@
        __asm __volatile ("1:bbssi $0,%0,1b"
                : /* No outputs */
                : "m"(*__alp)
-               : "cc");
+               : "cc", "memory");
 #endif /* _HARDKERNEL && MULTIPROCESSOR */
 }
 
@@ -124,7 +124,7 @@
        __asm __volatile ("bbcci $0,%0,1f;1:"
                : /* No output */
                : "m"(*__alp)
-               : "cc");
+               : "cc", "memory");
 #endif
 }
 



Home | Main Index | Thread Index | Old Index