Original bug: https://bugs.linaro.org/show_bug.cgi?id=355 Armv5 fails on compilation dmb instuction. Use the same thing like linux kernel does.
CC: Yao Zhao <[email protected]> Signed-off-by: Maxim Uvarov <[email protected]> --- Hi Yao, Can you please test this patch? Thank you, Maxim. platform/linux-generic/include/api/odp_sync.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/include/api/odp_sync.h b/platform/linux-generic/include/api/odp_sync.h index 9cf4d46..89bd307 100644 --- a/platform/linux-generic/include/api/odp_sync.h +++ b/platform/linux-generic/include/api/odp_sync.h @@ -31,9 +31,16 @@ static inline void odp_sync_stores(void) __asm__ __volatile__ ("sfence\n" : : : "memory"); -#elif defined __arm__ || defined __aarch64__ +#elif defined(__arm__) +#if __ARM_ARCH == 6 + __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ + : : "r" (0) : "memory") +#elif __ARM_ARCH >= 7 || defined __aarch64__ __asm__ __volatile__ ("dmb st" : : : "memory"); +#else + __asm__ __volatile__ ("" : : : "memory") +#endif #elif defined __OCTEON__ -- 1.8.5.1.163.gd7aced9 _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
