Skip to content

Commit

Permalink
x86: add gbpages support to lookup_address
Browse files Browse the repository at this point in the history
[ 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>
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Feb 4, 2008
1 parent 61e19a3 commit c2f71ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ pte_t *lookup_address(unsigned long address, int *level)
pud = pud_offset(pgd, address);
if (pud_none(*pud))
return NULL;

*level = PG_LEVEL_1G;
if (pud_large(*pud) || !pud_present(*pud))
return (pte_t *)pud;

pmd = pmd_offset(pud, address);
if (pmd_none(*pmd))
return NULL;
Expand Down

0 comments on commit c2f71ee

Please sign in to comment.