aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHirokazu Takata <takata@linux-m32r.org>2009-08-11 23:12:41 +0900
committerHirokazu Takata <takata@linux-m32r.org>2009-10-04 12:02:35 +0900
commit2cff5e1a83c61613febf814640dc877b98d585e6 (patch)
tree052efa0267b2636f2cca36cf1accc8a5b8062ff5
parent17d857be649a21ca90008c6dc425d849fa83db5c (diff)
downloadkernel_samsung_espresso10-2cff5e1a83c61613febf814640dc877b98d585e6.zip
kernel_samsung_espresso10-2cff5e1a83c61613febf814640dc877b98d585e6.tar.gz
kernel_samsung_espresso10-2cff5e1a83c61613febf814640dc877b98d585e6.tar.bz2
m32r: fix tme_handler
Fix pmd_bad check code of tme_handler (TLB Miss Exception handler). The correct _KERNPG_TABLE value is not 0x263(=611) but 0x163. Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
-rw-r--r--arch/m32r/mm/mmu.S12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S
index 49a6d16..e9491a5 100644
--- a/arch/m32r/mm/mmu.S
+++ b/arch/m32r/mm/mmu.S
@@ -150,9 +150,13 @@ ENTRY(tme_handler)
; pmd = pmd_offset(pgd, address);
ld r3, @r3 ; r3: pmd data
- ldi r2, #-4096
beqz r3, 3f ; pmd_none(*pmd) ?
+ and3 r2, r3, #0xfff
+ add3 r2, r2, #-355 ; _KERNPG_TABLE(=0x163)
+ bnez r2, 3f ; pmd_bad(*pmd) ?
+ ldi r2, #-4096
+
; pte = pte_offset(pmd, address);
and r2, r3 ; r2: pte base addr
srl3 r3, r0, #10
@@ -263,9 +267,9 @@ ENTRY(tme_handler)
ld r1, @r3 ; r1: pmd
beqz r1, 3f ; pmd_none(*pmd) ?
;
- and3 r1, r1, #0xeff
- ldi r4, #611 ; _KERNPG_TABLE(=611)
- bne r1, r4, 3f ; !pmd_bad(*pmd) ?
+ and3 r1, r1, #0x3ff
+ ldi r4, #0x163 ; _KERNPG_TABLE(=0x163)
+ bne r1, r4, 3f ; pmd_bad(*pmd) ?
.fillinsn
4: