提交 c2f71ee2 编写于 作者: A Andi Kleen 提交者: Ingo Molnar

x86: add gbpages support to lookup_address

[ tglx@linutronix.de: fix bootup crash on sparse mappings. ]
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 61e19a34
...@@ -209,6 +209,11 @@ pte_t *lookup_address(unsigned long address, int *level) ...@@ -209,6 +209,11 @@ pte_t *lookup_address(unsigned long address, int *level)
pud = pud_offset(pgd, address); pud = pud_offset(pgd, address);
if (pud_none(*pud)) if (pud_none(*pud))
return NULL; return NULL;
*level = PG_LEVEL_1G;
if (pud_large(*pud) || !pud_present(*pud))
return (pte_t *)pud;
pmd = pmd_offset(pud, address); pmd = pmd_offset(pud, address);
if (pmd_none(*pmd)) if (pmd_none(*pmd))
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册