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>

authored by

Andi Kleen and committed by
Ingo Molnar
c2f71ee2 61e19a34

+5
+5
arch/x86/mm/pageattr.c
··· 209 pud = pud_offset(pgd, address); 210 if (pud_none(*pud)) 211 return NULL; 212 pmd = pmd_offset(pud, address); 213 if (pmd_none(*pmd)) 214 return NULL;
··· 209 pud = pud_offset(pgd, address); 210 if (pud_none(*pud)) 211 return NULL; 212 + 213 + *level = PG_LEVEL_1G; 214 + if (pud_large(*pud) || !pud_present(*pud)) 215 + return (pte_t *)pud; 216 + 217 pmd = pmd_offset(pud, address); 218 if (pmd_none(*pmd)) 219 return NULL;