svn commit: r286726 - head/sys/arm/arm
Marcel Moolenaar
marcel at FreeBSD.org
Thu Aug 13 14:53:30 UTC 2015
Author: marcel
Date: Thu Aug 13 14:53:29 2015
New Revision: 286726
URL: https://svnweb.freebsd.org/changeset/base/286726
Log:
Instead of having separate do_sync functions for ARM_ARCH 6 vs.
ARM_ARCH >= 7, use the dmb() macro defined in machine/atomic.h
Submitted by: Steve Kiernan <stevek at juniper.net>
Reviewed by: imp@
Differential Revision: https://reviews.freebsd.org/D3355
Modified:
head/sys/arm/arm/stdatomic.c
Modified: head/sys/arm/arm/stdatomic.c
==============================================================================
--- head/sys/arm/arm/stdatomic.c Thu Aug 13 14:50:11 2015 (r286725)
+++ head/sys/arm/arm/stdatomic.c Thu Aug 13 14:53:29 2015 (r286726)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <machine/acle-compat.h>
+#include <machine/atomic.h>
#include <machine/cpufunc.h>
#include <machine/sysarch.h>
@@ -67,19 +68,12 @@ do_sync(void)
__asm volatile ("" : : : "memory");
}
-#elif __ARM_ARCH >= 7
-static inline void
-do_sync(void)
-{
-
- __asm volatile ("dmb" : : : "memory");
-}
#elif __ARM_ARCH >= 6
static inline void
do_sync(void)
{
- __asm volatile ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory");
+ dmb();
}
#endif
More information about the svn-src-all
mailing list