mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24:00 +08:00
x86: avoid duplicate running of pud_offset and pmd_offset in one_md_table_init()
Impact: simplify implementation, cleanup If !(pgd_val(*pgd) & _PAGE_PRESENT) in PAE mode, we need not get value of pmd_table again. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
7a5276889c
commit
a376f30a95
@ -102,6 +102,8 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd)
|
||||
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
|
||||
pud = pud_offset(pgd, 0);
|
||||
BUG_ON(pmd_table != pmd_offset(pud, 0));
|
||||
|
||||
return pmd_table;
|
||||
}
|
||||
#endif
|
||||
pud = pud_offset(pgd, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user