mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
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@juniper.net> Reviewed by: imp@ Differential Revision: https://reviews.freebsd.org/D3355
This commit is contained in:
parent
5b44efcf47
commit
ea205656bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286726
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user