summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0036-powerpc-Add-memory-attribute-for-mfmsr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0036-powerpc-Add-memory-attribute-for-mfmsr.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0036-powerpc-Add-memory-attribute-for-mfmsr.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0036-powerpc-Add-memory-attribute-for-mfmsr.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0036-powerpc-Add-memory-attribute-for-mfmsr.patch
new file mode 100644
index 00000000..f6315644
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.25/0036-powerpc-Add-memory-attribute-for-mfmsr.patch
@@ -0,0 +1,34 @@
1From 3fed281f20c3b2cdfe1a1f087973b0c0e3b4cd05 Mon Sep 17 00:00:00 2001
2From: Tiejun Chen <tiejun.chen@windriver.com>
3Date: Wed, 11 Jul 2012 14:22:46 +1000
4Subject: [PATCH 36/73] powerpc: Add "memory" attribute for mfmsr()
5
6commit b416c9a10baae6a177b4f9ee858b8d309542fbef upstream.
7
8Add "memory" attribute in inline assembly language as a compiler
9barrier to make sure 4.6.x GCC don't reorder mfmsr().
10
11Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
12Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
14---
15 arch/powerpc/include/asm/reg.h | 3 ++-
16 1 files changed, 2 insertions(+), 1 deletions(-)
17
18diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
19index 559da19..578e5a0 100644
20--- a/arch/powerpc/include/asm/reg.h
21+++ b/arch/powerpc/include/asm/reg.h
22@@ -1016,7 +1016,8 @@
23 /* Macros for setting and retrieving special purpose registers */
24 #ifndef __ASSEMBLY__
25 #define mfmsr() ({unsigned long rval; \
26- asm volatile("mfmsr %0" : "=r" (rval)); rval;})
27+ asm volatile("mfmsr %0" : "=r" (rval) : \
28+ : "memory"); rval;})
29 #ifdef CONFIG_PPC_BOOK3S_64
30 #define __mtmsrd(v, l) asm volatile("mtmsrd %0," __stringify(l) \
31 : : "r" (v) : "memory")
32--
331.7.7.6
34