]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/include/asm/processor.h
Merge remote-tracking branch 'hid/for-next'
[karo-tx-linux.git] / arch / arm / include / asm / processor.h
index 26164c92fa308102de2d16965da706fa7a4bb2d7..c3d5fc124a054c6309ffacdb2845ff22fd5bfa56 100644 (file)
@@ -112,12 +112,19 @@ static inline void prefetch(const void *ptr)
                :: "p" (ptr));
 }
 
+#if __LINUX_ARM_ARCH__ >= 7 && defined(CONFIG_SMP)
 #define ARCH_HAS_PREFETCHW
-#define prefetchw(ptr) prefetch(ptr)
-
-#define ARCH_HAS_SPINLOCK_PREFETCH
-#define spin_lock_prefetch(x) do { } while (0)
-
+static inline void prefetchw(const void *ptr)
+{
+       __asm__ __volatile__(
+               ".arch_extension        mp\n"
+               __ALT_SMP_ASM(
+                       WASM(pldw)              "\t%a0",
+                       WASM(pld)               "\t%a0"
+               )
+               :: "p" (ptr));
+}
+#endif
 #endif
 
 #define HAVE_ARCH_PICK_MMAP_LAYOUT