Commit 9a4c2568 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] remove unnecessary PAE pgd set

From: Dave Hansen <haveblue@us.ibm.com>, Bill Irwin

With PAE on, there are only 4 PGD entries.  The kernel ones never change,
so there is no need to copy them when a vmalloc fault occurs.  This was
this was causing problems with the split pmd patches, but it is still
correct for mainline.

Tested with and without PAE.  I ran it in a loop turning on and off 10 swap
partitions, which is what excited the original bug.
http://bugme.osdl.org/show_bug.cgi?id=640
parent e5be69be
......@@ -324,8 +324,12 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
if (!pgd_present(*pgd_k))
goto no_context;
set_pgd(pgd, *pgd_k);
/*
* set_pgd(pgd, *pgd_k); here would be useless on PAE
* and redundant with the set_pmd() on non-PAE.
*/
pmd = pmd_offset(pgd, address);
pmd_k = pmd_offset(pgd_k, address);
if (!pmd_present(*pmd_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