Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/include Nix mb_* on powerpc.
details: https://anonhg.NetBSD.org/src/rev/3f7501ec58d2
branches: trunk
changeset: 846720:3f7501ec58d2
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Nov 29 20:05:59 2019 +0000
description:
Nix mb_* on powerpc.
diffstat:
sys/arch/powerpc/include/lock.h | 20 +-------------------
sys/arch/powerpc/include/mutex.h | 6 +++---
2 files changed, 4 insertions(+), 22 deletions(-)
diffs (52 lines):
diff -r fe63000af87b -r 3f7501ec58d2 sys/arch/powerpc/include/lock.h
--- a/sys/arch/powerpc/include/lock.h Fri Nov 29 20:05:49 2019 +0000
+++ b/sys/arch/powerpc/include/lock.h Fri Nov 29 20:05:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.13 2017/09/17 00:01:08 christos Exp $ */
+/* $NetBSD: lock.h,v 1.14 2019/11/29 20:05:59 riastradh Exp $ */
/*-
* Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -120,22 +120,4 @@
*alp = __SIMPLELOCK_UNLOCKED;
}
-static __inline void
-mb_read(void)
-{
- __asm volatile ("isync" ::: "memory");
-}
-
-static __inline void
-mb_write(void)
-{
- __asm volatile ("sync" ::: "memory");
-}
-
-static __inline void
-mb_memory(void)
-{
- __asm volatile ("sync" ::: "memory");
-}
-
#endif /* _POWERPC_LOCK_H_ */
diff -r fe63000af87b -r 3f7501ec58d2 sys/arch/powerpc/include/mutex.h
--- a/sys/arch/powerpc/include/mutex.h Fri Nov 29 20:05:49 2019 +0000
+++ b/sys/arch/powerpc/include/mutex.h Fri Nov 29 20:05:59 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mutex.h,v 1.4 2008/04/28 20:23:32 martin Exp $ */
+/* $NetBSD: mutex.h,v 1.5 2019/11/29 20:05:59 riastradh Exp $ */
/*-
* Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -61,8 +61,8 @@
#define __HAVE_SIMPLE_MUTEXES 1
#define __HAVE_MUTEX_STUBS 1
-#define MUTEX_RECEIVE(mtx) mb_read()
-#define MUTEX_GIVE(mtx) mb_memory()
+#define MUTEX_RECEIVE(mtx) __asm __volatile("isync" ::: "memory")
+#define MUTEX_GIVE(mtx) __asm __volatile("sync" ::: "memory")
#define MUTEX_CAS(p, o, n) _lock_cas((p), (o), (n))
Home |
Main Index |
Thread Index |
Old Index