Commit d1563e85 authored by Dave Hansen's avatar Dave Hansen Committed by Linus Torvalds

[PATCH] vmalloc_fault() cleanup

Store the physical pgd address in a different variable than the virtual
address.

There's no real reason to only use 1 variable here, other than saving a
line of code.  But, the types really are different and we might as well
just spell that out explicitly.
Signed-off-by: default avatarDave Hansen <haveblue@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3d5dc24c
......@@ -513,12 +513,13 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
* an interrupt in the middle of a task switch..
*/
int index = pgd_index(address);
unsigned long pgd_paddr;
pgd_t *pgd, *pgd_k;
pmd_t *pmd, *pmd_k;
pte_t *pte_k;
asm("movl %%cr3,%0":"=r" (pgd));
pgd = index + (pgd_t *)__va(pgd);
asm("movl %%cr3,%0":"=r" (pgd_paddr));
pgd = index + (pgd_t *)__va(pgd_paddr);
pgd_k = init_mm.pgd + index;
if (!pgd_present(*pgd_k))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment