Skip to content

Commit

Permalink
sh: Get the PGD right in oops case with 64-bit PTEs.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pmundt committed Dec 6, 2006
1 parent 9f650cf commit bca7c20
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/sh/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,9 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
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;
Expand Down

0 comments on commit bca7c20

Please sign in to comment.