Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/include Fix RPI (armv6) build



details:   https://anonhg.NetBSD.org/src/rev/eac5a32207f5
branches:  trunk
changeset: 976671:eac5a32207f5
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Sep 29 18:13:29 2020 +0000

description:
Fix RPI (armv6) build

diffstat:

 sys/arch/arm/include/cpufunc.h |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (26 lines):

diff -r b918809728a1 -r eac5a32207f5 sys/arch/arm/include/cpufunc.h
--- a/sys/arch/arm/include/cpufunc.h    Tue Sep 29 16:35:42 2020 +0000
+++ b/sys/arch/arm/include/cpufunc.h    Tue Sep 29 18:13:29 2020 +0000
@@ -44,6 +44,7 @@
 
 #define        isb()           __asm __volatile("isb" : : : "memory")
 
+#ifdef _ARM_ARCH_7
 /*
  * Options for DMB and DSB:
  *     oshld   Outer Shareable, load
@@ -61,6 +62,14 @@
  */
 #define        dsb(opt)        __asm __volatile("dsb " __STRING(opt) : : : "memory")
 #define        dmb(opt)        __asm __volatile("dmb " __STRING(opt) : : : "memory")
+#else
+
+#define dsb(opt)       \
+       __asm __volatile("mcr p15, 0, %0, c7, c10, 4" :: "r" (0) : "memory")
+#define dmb(opt)       \
+       __asm __volatile("mcr p15, 0, %0, c7, c10, 5" :: "r" (0) : "memory")
+
+#endif
 
 #ifdef __arm__
 



Home | Main Index | Thread Index | Old Index