aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/mm/fault.c')
-rw-r--r--arch/i386/mm/fault.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index 61d9e34af5a6..411b8500ad1b 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -233,7 +233,7 @@ fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code)
233 int write, si_code; 233 int write, si_code;
234 234
235 /* get the address */ 235 /* get the address */
236 __asm__("movl %%cr2,%0":"=r" (address)); 236 address = read_cr2();
237 237
238 if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, 238 if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14,
239 SIGSEGV) == NOTIFY_STOP) 239 SIGSEGV) == NOTIFY_STOP)
@@ -453,7 +453,7 @@ no_context:
453 printk(" at virtual address %08lx\n",address); 453 printk(" at virtual address %08lx\n",address);
454 printk(KERN_ALERT " printing eip:\n"); 454 printk(KERN_ALERT " printing eip:\n");
455 printk("%08lx\n", regs->eip); 455 printk("%08lx\n", regs->eip);
456 asm("movl %%cr3,%0":"=r" (page)); 456 page = read_cr3();
457 page = ((unsigned long *) __va(page))[address >> 22]; 457 page = ((unsigned long *) __va(page))[address >> 22];
458 printk(KERN_ALERT "*pde = %08lx\n", page); 458 printk(KERN_ALERT "*pde = %08lx\n", page);
459 /* 459 /*
@@ -526,7 +526,7 @@ vmalloc_fault:
526 pmd_t *pmd, *pmd_k; 526 pmd_t *pmd, *pmd_k;
527 pte_t *pte_k; 527 pte_t *pte_k;
528 528
529 asm("movl %%cr3,%0":"=r" (pgd_paddr)); 529 pgd_paddr = read_cr3();
530 pgd = index + (pgd_t *)__va(pgd_paddr); 530 pgd = index + (pgd_t *)__va(pgd_paddr);
531 pgd_k = init_mm.pgd + index; 531 pgd_k = init_mm.pgd + index;
532 532