diff options
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.patch | 46 |
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 @@ | |||
1 | From b7072ddc2682868372d060e1e25447e5c1aee007 Mon Sep 17 00:00:00 2001 | ||
2 | From: Aric D. Blumer <aric@sdgsystems.com> | ||
3 | Date: Wed, 29 Dec 2010 11:18:29 -0500 | ||
4 | Subject: [PATCH 56/65] ARM: pxa: fix page table corruption on resume | ||
5 | |||
6 | Before this patch, the following error would sometimes occur after a | ||
7 | resume on pxa3xx: | ||
8 | |||
9 | /path/to/mm/memory.c:144: bad pmd 8040542e. | ||
10 | |||
11 | The problem was that a temporary page table mapping was being improperly | ||
12 | restored. | ||
13 | |||
14 | The PXA3xx resume code creates a temporary mapping of resume_turn_on_mmu | ||
15 | to avoid a prefetch abort. The pxa3xx_resume_after_mmu code requires | ||
16 | that the r1 register holding the address of this mapping not be | ||
17 | modified, however, resume_turn_on_mmu does modify it. It is mostly | ||
18 | correct in that r1 receives the base table address, but it may also | ||
19 | get other bits in 13:0. This results in pxa3xx_resume_after_mmu | ||
20 | restoring the original mapping to the wrong place, corrupting memory | ||
21 | and leaving the temporary mapping in place. | ||
22 | |||
23 | Signed-off-by: Matt Reimer <mreimer@sdgsystems.com> | ||
24 | Signed-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 | |||
29 | diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S | ||
30 | index 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 | -- | ||
45 | 1.6.6.1 | ||
46 | |||