summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch b/extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch
new file mode 100644
index 00000000..5ae9609e
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0056-ARM-pxa-fix-page-table-corruption-on-resume.patch
@@ -0,0 +1,46 @@
1From b7072ddc2682868372d060e1e25447e5c1aee007 Mon Sep 17 00:00:00 2001
2From: Aric D. Blumer <aric@sdgsystems.com>
3Date: Wed, 29 Dec 2010 11:18:29 -0500
4Subject: [PATCH 56/65] ARM: pxa: fix page table corruption on resume
5
6Before this patch, the following error would sometimes occur after a
7resume on pxa3xx:
8
9 /path/to/mm/memory.c:144: bad pmd 8040542e.
10
11The problem was that a temporary page table mapping was being improperly
12restored.
13
14The PXA3xx resume code creates a temporary mapping of resume_turn_on_mmu
15to avoid a prefetch abort. The pxa3xx_resume_after_mmu code requires
16that the r1 register holding the address of this mapping not be
17modified, however, resume_turn_on_mmu does modify it. It is mostly
18correct in that r1 receives the base table address, but it may also
19get other bits in 13:0. This results in pxa3xx_resume_after_mmu
20restoring the original mapping to the wrong place, corrupting memory
21and leaving the temporary mapping in place.
22
23Signed-off-by: Matt Reimer <mreimer@sdgsystems.com>
24Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
25---
26 arch/arm/mach-pxa/sleep.S | 4 ++--
27 1 files changed, 2 insertions(+), 2 deletions(-)
28
29diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S
30index 52c30b0..ae00811 100644
31--- a/arch/arm/mach-pxa/sleep.S
32+++ b/arch/arm/mach-pxa/sleep.S
33@@ -353,8 +353,8 @@ resume_turn_on_mmu:
34
35 @ Let us ensure we jump to resume_after_mmu only when the mcr above
36 @ actually took effect. They call it the "cpwait" operation.
37- mrc p15, 0, r1, c2, c0, 0 @ queue a dependency on CP15
38- sub pc, r2, r1, lsr #32 @ jump to virtual addr
39+ mrc p15, 0, r0, c2, c0, 0 @ queue a dependency on CP15
40+ sub pc, r2, r0, lsr #32 @ jump to virtual addr
41 nop
42 nop
43 nop
44--
451.6.6.1
46