summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-12-01 04:14:11 +0100
committerPaul Mundt <lethal@linux-sh.org>2006-12-06 02:45:39 +0100
commitbca7c20764c83a44c7b8b0831089922d56a3a9a2 (patch)
tree18c82b8b8e5b3542301421d5e165541ce0d8b5f7 /arch/sh/mm
parentsh: Fix store queue bitmap end. (diff)
downloadlinux-bca7c20764c83a44c7b8b0831089922d56a3a9a2.tar.xz
linux-bca7c20764c83a44c7b8b0831089922d56a3a9a2.zip
sh: Get the PGD right in oops case with 64-bit PTEs.
Previously this was using a static pgd shift in the reporting code, simply flip this to PGDIR_SHIFT which does the right thing depending on varying PTE magnitudes on the SH-X2 MMU. While we're at it, and since it's been recently added, use get_TTB() for fetching the TTB, rather than the open coded instructions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r--arch/sh/mm/fault.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 123fb80c859d..cfeefc10e254 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -174,11 +174,9 @@ no_context:
printk(KERN_ALERT "Unable to handle kernel paging request");
printk(" at virtual address %08lx\n", address);
printk(KERN_ALERT "pc = %08lx\n", regs->pc);
- asm volatile("mov.l %1, %0"
- : "=r" (page)
- : "m" (__m(MMU_TTB)));
+ page = (unsigned long)get_TTB();
if (page) {
- page = ((unsigned long *) page)[address >> 22];
+ page = ((unsigned long *) page)[address >> PGDIR_SHIFT];
printk(KERN_ALERT "*pde = %08lx\n", page);
if (page & _PAGE_PRESENT) {
page &= PAGE_MASK;