Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1: fix x86 local build #512

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 7 additions & 14 deletions v1/wd_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,21 +339,14 @@ struct wcrypto_ecc_out {
#endif

#if defined(__AARCH64_CMODEL_SMALL__) && __AARCH64_CMODEL_SMALL__

#define dsb(opt) { asm volatile("dsb " #opt : : : "memory"); }
#define rmb() dsb(ld) /* read fence */
#define wmb() dsb(st) /* write fence */
#define mb() dsb(sy) /* rw fence */

#define dsb(opt) { asm volatile("dsb " #opt : : : "memory"); }
#define rmb() dsb(ld) /* read fence */
#define wmb() dsb(st) /* write fence */
#define mb() dsb(sy) /* rw fence */
#else

#define rmb() /* read fence */
#define wmb() /* write fence */
#define mb() /* rw fence */
#ifndef __UT__
#error "no platform mb, define one before compiling"
#endif

#define rmb() __sync_synchronize() /* read fence */
#define wmb() __sync_synchronize() /* write fence */
#define mb() __sync_synchronize() /* rw fence */
#endif

static inline void wd_reg_write(void *reg_addr, uint32_t value)
Expand Down