summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorZhaolei <zhaolei@cn.fujitsu.com>2008-10-31 17:43:04 +0800
committerIngo Molnar <mingo@elte.hu>2008-10-31 11:03:17 +0100
commita376f30a95a796cde81d6dffde0f5243c8bd8f92 (patch)
tree443b34aae8d99524ee9e7669ade05c6f06585967 /arch/x86/mm
parent7a5276889cfa96619bf863c87581005f46139986 (diff)
downloadop-kernel-dev-a376f30a95a796cde81d6dffde0f5243c8bd8f92.zip
op-kernel-dev-a376f30a95a796cde81d6dffde0f5243c8bd8f92.tar.gz
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>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/init_32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 8396868..7f8a2da 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -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);
OpenPOWER on IntegriCloud