aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2008-02-04 10:48:09 -0500
committerIngo Molnar <mingo@elte.hu>2008-02-04 10:48:09 -0500
commitc2f71ee2140b2a506735ff9fcb7e3b1dfaab8f2b (patch)
treeb765d37850cdcfb4ac5b216935c04a5f85c0e960 /arch
parent61e19a347ad4bcdda615ef77ef9c3e656e254f3d (diff)
x86: add gbpages support to lookup_address
[ tglx@linutronix.de: fix bootup crash on sparse mappings. ] Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/pageattr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 9be684e61dcb..143fbafc948a 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -209,6 +209,11 @@ pte_t *lookup_address(unsigned long address, int *level)
209 pud = pud_offset(pgd, address); 209 pud = pud_offset(pgd, address);
210 if (pud_none(*pud)) 210 if (pud_none(*pud))
211 return NULL; 211 return NULL;
212
213 *level = PG_LEVEL_1G;
214 if (pud_large(*pud) || !pud_present(*pud))
215 return (pte_t *)pud;
216
212 pmd = pmd_offset(pud, address); 217 pmd = pmd_offset(pud, address);
213 if (pmd_none(*pmd)) 218 if (pmd_none(*pmd))
214 return NULL; 219 return NULL;