summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch')
-rw-r--r--meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch b/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
new file mode 100644
index 0000000000..92e804f98d
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
@@ -0,0 +1,38 @@
1From a2d385e504323641b1127821833c61e77301c90b Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Sat, 11 Jun 2016 22:45:37 +0300
4Subject: [PATCH] Forward port mips & arm memory barrier patches
5
6Upstream-Status: Pending
7Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
8---
9 lib/util/util.h | 15 +++++++++++++++
10 1 file changed, 15 insertions(+)
11
12diff --git a/lib/util/util.h b/lib/util/util.h
13index 591722d..0768056 100644
14--- a/lib/util/util.h
15+++ b/lib/util/util.h
16@@ -29,4 +29,19 @@
17 #define read_barrier() asm volatile("" ::: "memory")
18 #endif
19
20+#ifdef __arm__
21+/*
22+ * Use the __kuser_memory_barrier helper in the CPU helper page. See
23+ * arch/arm/kernel/entry-armv.S in the kernel source for details.
24+ */
25+#define read_barrier() ((void(*)(void))0xffff0fa0)()
26+#endif
27+
28+#ifdef __mips__
29+#define read_barrier() asm volatile(".set mips2\n\t" \
30+ "sync\n\t" \
31+ ".set mips0" ::: "memory")
32+#endif
33+
34+
35 #endif /* SP_UTIL_H */
36--
372.1.4
38