ARC: [plat-eznps] Use dedicated SMP barriers
authorNoam Camus <noamc@ezchip.com>
Fri, 10 Apr 2015 18:28:50 +0000 (21:28 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 9 May 2016 04:02:33 +0000 (09:32 +0530)
NPS device got 256 cores and each got 16 HW threads (SMT).
We use EZchip dedicated ISA to trigger HW scheduler of the
core that current HW thread belongs to.
This scheduling makes sure that data beyond barrier is available
to all HW threads in core and by that to all in device (4K).

Signed-off-by: Noam Camus <noamc@ezchip.com>
Cc: Peter Zijlstra <peterz@infradead.org>
arch/arc/include/asm/barrier.h

index a7209983ee64feee4a04cb58e28c21cc7ca23dd8..b1e327495c7d21f70785ee303f86a341c0ae10a9 100644 (file)
@@ -30,9 +30,7 @@
 #define rmb()  asm volatile("dmb 1\n" : : : "memory")
 #define wmb()  asm volatile("dmb 2\n" : : : "memory")
 
-#endif
-
-#ifdef CONFIG_ISA_ARCOMPACT
+#elif !defined(CONFIG_ARC_PLAT_EZNPS)  /* CONFIG_ISA_ARCOMPACT */
 
 /*
  * ARCompact based cores (ARC700) only have SYNC instruction which is super
  */
 
 #define mb()   asm volatile("sync\n" : : : "memory")
+
+#else  /* CONFIG_ARC_PLAT_EZNPS */
+
+#include <plat/ctop.h>
+
+#define mb()   asm volatile (".word %0" : : "i"(CTOP_INST_SCHD_RW) : "memory")
+#define rmb()  asm volatile (".word %0" : : "i"(CTOP_INST_SCHD_RD) : "memory")
+
 #endif
 
 #include <asm-generic/barrier.h>
This page took 0.024944 seconds and 5 git commands to generate.