diff options
author | Andi Kleen <ak@suse.de> | 2006-01-11 22:44:00 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 19:04:53 -0800 |
commit | f95190b28daa1bebf78ab5ec4129d01a223982c5 (patch) | |
tree | d6a022685daf4c27a3583f25937f35d20051ebf7 /arch/x86_64/mm | |
parent | c11efdf94d3152443c11334720824bb6c7f6c655 (diff) |
[PATCH] x86_64: Remove unnecessary case from the page fault handler
Don't need to do the vmalloc check for the module range because its
PML4 is shared with the kernel text.
Also removed an unnecessary TLB flush.
Pointed out by Jan Beulich
Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/mm')
-rw-r--r-- | arch/x86_64/mm/fault.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index fd07b86c062..2a9c836133a 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c @@ -237,7 +237,7 @@ static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs, } /* - * Handle a fault on the vmalloc or module mapping area + * Handle a fault on the vmalloc area * * This assumes no large pages in there. */ @@ -283,7 +283,6 @@ static int vmalloc_fault(unsigned long address) that. */ if (!pte_present(*pte) || pte_pfn(*pte) != pte_pfn(*pte_ref)) BUG(); - __flush_tlb_all(); return 0; } @@ -346,9 +345,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, * protection error (error_code & 9) == 0. */ if (unlikely(address >= TASK_SIZE64)) { + /* + * Don't check for the module range here: its PML4 + * is always initialized because it's shared with the main + * kernel text. Only vmalloc may need PML4 syncups. + */ if (!(error_code & 0xd) && - ((address >= VMALLOC_START && address < VMALLOC_END) || - (address >= MODULES_VADDR && address < MODULES_END))) { + ((address >= VMALLOC_START && address < VMALLOC_END))) { if (vmalloc_fault(address) < 0) goto bad_area_nosemaphore; return; |