summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-omap-2.6.29/no-cortex-deadlock.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-kernel/linux/linux-omap-2.6.29/no-cortex-deadlock.patch
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/no-cortex-deadlock.patch')
-rw-r--r--meta/recipes-kernel/linux/linux-omap-2.6.29/no-cortex-deadlock.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/no-cortex-deadlock.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/no-cortex-deadlock.patch
new file mode 100644
index 0000000000..78547c8969
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/no-cortex-deadlock.patch
@@ -0,0 +1,77 @@
1From: Mans Rullgard <mans@mansr.com>
2Date: Sat, 16 Aug 2008 23:03:06 +0000 (+0100)
3Subject: ARM: Workaround for erratum 451034
4X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=b84fa87873ffb68ad23930cf6cddeea8bec43ede
5
6ARM: Workaround for erratum 451034
7
8On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer
9store in the store buffer, can cause a processor deadlock under
10certain conditions.
11
12Executing a DMB instruction before saving NEON/VFP registers and before
13return to userspace makes it safe to run code which includes similar
14counter-measures. Userspace code can still trigger the deadlock, so
15a different workaround is required to safely run untrusted code.
16
17See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details.
18
19Signed-off-by: Mans Rullgard <mans@mansr.com>
20---
21
22diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
23index aa475d9..41d536e 100644
24--- a/arch/arm/Kconfig
25+++ b/arch/arm/Kconfig
26@@ -1117,6 +1117,22 @@ config NEON
27 Say Y to include support code for NEON, the ARMv7 Advanced SIMD
28 Extension.
29
30+config ARM_ERRATUM_451034
31+ bool "Enable workaround for ARM erratum 451034"
32+ depends on VFPv3
33+ help
34+ On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer
35+ store in the store buffer, can cause a processor deadlock under
36+ certain conditions.
37+
38+ See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details.
39+
40+ Say Y to include a partial workaround.
41+
42+ WARNING: Even with this option enabled, userspace code can trigger
43+ the deadlock. To safely run untrusted code, a different fix is
44+ required.
45+
46 endmenu
47
48 menu "Userspace binary formats"
49diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h
50index 422f3cc..934798b 100644
51--- a/arch/arm/include/asm/vfpmacros.h
52+++ b/arch/arm/include/asm/vfpmacros.h
53@@ -32,6 +32,9 @@
54
55 @ write all the working registers out of the VFP
56 .macro VFPFSTMIA, base, tmp
57+#ifdef CONFIG_ARM_ERRATUM_451034
58+ dmb
59+#endif
60 #if __LINUX_ARM_ARCH__ < 6
61 STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15}
62 #else
63diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
64index 060d7e2..9799a35 100644
65--- a/arch/arm/kernel/entry-common.S
66+++ b/arch/arm/kernel/entry-common.S
67@@ -69,6 +69,10 @@ no_work_pending:
68 /* perform architecture specific actions before user return */
69 arch_ret_to_user r1, lr
70
71+#ifdef CONFIG_ARM_ERRATUM_451034
72+ dmb
73+#endif
74+
75 @ slow_restore_user_regs
76 ldr r1, [sp, #S_PSR] @ get calling cpsr
77 ldr lr, [sp, #S_PC]! @ get pc