diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-08-01 03:39:51 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-08-01 03:39:51 -0400 |
commit | 06f862c8ce0893b5525ce90f39168eaf4608ecc6 (patch) | |
tree | 61c6d2300a0426cc6317c50a1e213d27e2c75719 /arch/sh/mm | |
parent | 56c74c733cdd101832c4bbf9af8a009a9eaec784 (diff) |
sh: Fix pgd mismatch from cached TTB in unhandled fault.
When reading the cached TTB value and extracting the pgd, we
accidentally applied a __va() to it and bumped it off in to bogus
space which ended up causing multiple faults in the error path.
Fix it up so unhandled faults don't do strange and highly unorthodox
things when oopsing.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r-- | arch/sh/mm/fault.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index 964c6767dc73..04a39aa7f1f9 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c | |||
@@ -184,8 +184,7 @@ no_context: | |||
184 | printk(KERN_ALERT "pc = %08lx\n", regs->pc); | 184 | printk(KERN_ALERT "pc = %08lx\n", regs->pc); |
185 | page = (unsigned long)get_TTB(); | 185 | page = (unsigned long)get_TTB(); |
186 | if (page) { | 186 | if (page) { |
187 | page = ((__typeof__(page) *) __va(page))[address >> | 187 | page = ((__typeof__(page) *)page)[address >> PGDIR_SHIFT]; |
188 | PGDIR_SHIFT]; | ||
189 | printk(KERN_ALERT "*pde = %08lx\n", page); | 188 | printk(KERN_ALERT "*pde = %08lx\n", page); |
190 | if (page & _PAGE_PRESENT) { | 189 | if (page & _PAGE_PRESENT) { |
191 | page &= PAGE_MASK; | 190 | page &= PAGE_MASK; |