mirror of
https://github.com/opnsense/src.git
synced 2026-04-01 23:45:12 -04: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
1 changed files with 2 additions and 8 deletions
|
|
@ -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 a new issue