]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-bsp/linux/linux-omap/linus/0057-ARM-pxa-fix-page-table-corruption-on-resume.patch
TI-BSP: import matrix from OE
[glsdk/meta-ti-glsdk.git] / recipes-bsp / linux / linux-omap / linus / 0057-ARM-pxa-fix-page-table-corruption-on-resume.patch
1 From 24c78557741395e038e83f25367cf2bfd7f582b8 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 57/66] ARM: pxa: fix page table corruption on resume
6 Before this patch, the following error would sometimes occur after a
7 resume on pxa3xx:
9     /path/to/mm/memory.c:144: bad pmd 8040542e.
11 The problem was that a temporary page table mapping was being improperly
12 restored.
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.
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(-)
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