diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-09-14 14:04:09 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-09-21 10:29:42 +0200 |
commit | 1af372a5eeaba3115f139e4efc0204e2cd7208bb (patch) | |
tree | 56f12d79bdbd298fcfd1891d3da7db34f244d670 /freebsd/sys/contrib/ck/include/gcc/ppc/ck_pr.h | |
parent | Update to FreeBSD head 2018-09-17 (diff) | |
download | rtems-libbsd-1af372a5eeaba3115f139e4efc0204e2cd7208bb.tar.bz2 |
ck: No hardware barriers in uniprocessor configs
Update #3472.
Diffstat (limited to '')
-rw-r--r-- | freebsd/sys/contrib/ck/include/gcc/ppc/ck_pr.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/freebsd/sys/contrib/ck/include/gcc/ppc/ck_pr.h b/freebsd/sys/contrib/ck/include/gcc/ppc/ck_pr.h index 73f0cb78..c10b2092 100644 --- a/freebsd/sys/contrib/ck/include/gcc/ppc/ck_pr.h +++ b/freebsd/sys/contrib/ck/include/gcc/ppc/ck_pr.h @@ -67,22 +67,28 @@ ck_pr_stall(void) __asm__ __volatile__(I ::: "memory"); \ } +#ifdef RTEMS_SMP #ifdef CK_MD_PPC32_LWSYNC #define CK_PR_LWSYNCOP "lwsync" #else /* CK_MD_PPC32_LWSYNC_DISABLE */ #define CK_PR_LWSYNCOP "sync" #endif +#define CK_PR_SYNCOP "sync" +#else /* !RTEMS_SMP */ +#define CK_PR_LWSYNCOP "" +#define CK_PR_SYNCOP "" +#endif /* RTEMS_SMP */ CK_PR_FENCE(atomic, CK_PR_LWSYNCOP) CK_PR_FENCE(atomic_store, CK_PR_LWSYNCOP) -CK_PR_FENCE(atomic_load, "sync") +CK_PR_FENCE(atomic_load, CK_PR_SYNCOP) CK_PR_FENCE(store_atomic, CK_PR_LWSYNCOP) CK_PR_FENCE(load_atomic, CK_PR_LWSYNCOP) CK_PR_FENCE(store, CK_PR_LWSYNCOP) -CK_PR_FENCE(store_load, "sync") +CK_PR_FENCE(store_load, CK_PR_SYNCOP) CK_PR_FENCE(load, CK_PR_LWSYNCOP) CK_PR_FENCE(load_store, CK_PR_LWSYNCOP) -CK_PR_FENCE(memory, "sync") +CK_PR_FENCE(memory, CK_PR_SYNCOP) CK_PR_FENCE(acquire, CK_PR_LWSYNCOP) CK_PR_FENCE(release, CK_PR_LWSYNCOP) CK_PR_FENCE(acqrel, CK_PR_LWSYNCOP) @@ -90,6 +96,7 @@ CK_PR_FENCE(lock, CK_PR_LWSYNCOP) CK_PR_FENCE(unlock, CK_PR_LWSYNCOP) #undef CK_PR_LWSYNCOP +#undef CK_PR_SYNCOP #undef CK_PR_FENCE |