diff options
author | Hirokazu Takata <takata@linux-m32r.org> | 2009-08-11 10:12:41 -0400 |
---|---|---|
committer | Hirokazu Takata <takata@linux-m32r.org> | 2009-10-03 23:02:35 -0400 |
commit | 2cff5e1a83c61613febf814640dc877b98d585e6 (patch) | |
tree | 052efa0267b2636f2cca36cf1accc8a5b8062ff5 | |
parent | 17d857be649a21ca90008c6dc425d849fa83db5c (diff) |
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.S | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/m32r/mm/mmu.S b/arch/m32r/mm/mmu.S index 49a6d16a3d58..e9491a5ae827 100644 --- a/arch/m32r/mm/mmu.S +++ b/arch/m32r/mm/mmu.S | |||
@@ -150,9 +150,13 @@ ENTRY(tme_handler) | |||
150 | 150 | ||
151 | ; pmd = pmd_offset(pgd, address); | 151 | ; pmd = pmd_offset(pgd, address); |
152 | ld r3, @r3 ; r3: pmd data | 152 | ld r3, @r3 ; r3: pmd data |
153 | ldi r2, #-4096 | ||
154 | beqz r3, 3f ; pmd_none(*pmd) ? | 153 | beqz r3, 3f ; pmd_none(*pmd) ? |
155 | 154 | ||
155 | and3 r2, r3, #0xfff | ||
156 | add3 r2, r2, #-355 ; _KERNPG_TABLE(=0x163) | ||
157 | bnez r2, 3f ; pmd_bad(*pmd) ? | ||
158 | ldi r2, #-4096 | ||
159 | |||
156 | ; pte = pte_offset(pmd, address); | 160 | ; pte = pte_offset(pmd, address); |
157 | and r2, r3 ; r2: pte base addr | 161 | and r2, r3 ; r2: pte base addr |
158 | srl3 r3, r0, #10 | 162 | srl3 r3, r0, #10 |
@@ -263,9 +267,9 @@ ENTRY(tme_handler) | |||
263 | ld r1, @r3 ; r1: pmd | 267 | ld r1, @r3 ; r1: pmd |
264 | beqz r1, 3f ; pmd_none(*pmd) ? | 268 | beqz r1, 3f ; pmd_none(*pmd) ? |
265 | ; | 269 | ; |
266 | and3 r1, r1, #0xeff | 270 | and3 r1, r1, #0x3ff |
267 | ldi r4, #611 ; _KERNPG_TABLE(=611) | 271 | ldi r4, #0x163 ; _KERNPG_TABLE(=0x163) |
268 | bne r1, r4, 3f ; !pmd_bad(*pmd) ? | 272 | bne r1, r4, 3f ; pmd_bad(*pmd) ? |
269 | 273 | ||
270 | .fillinsn | 274 | .fillinsn |
271 | 4: | 275 | 4: |