* [PATCH] Avoid duplicate running of pud_offset and pmd_offset in one_md_table_init()
@ 2008-10-31 9:43 Zhaolei
2008-10-31 10:03 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Zhaolei @ 2008-10-31 9:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar
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>
---
arch/x86/mm/init_32.c | 2 ++
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);
--
1.5.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Avoid duplicate running of pud_offset and pmd_offset in one_md_table_init()
2008-10-31 9:43 [PATCH] Avoid duplicate running of pud_offset and pmd_offset in one_md_table_init() Zhaolei
@ 2008-10-31 10:03 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-10-31 10:03 UTC (permalink / raw)
To: Zhaolei
Cc: linux-kernel, Thomas Gleixner, H. Peter Anvin, Yinghai Lu,
Jeremy Fitzhardinge
* Zhaolei <zhaolei@cn.fujitsu.com> wrote:
> 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>
> ---
> arch/x86/mm/init_32.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
applied to tip/x86/cleanups, thanks!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-31 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 9:43 [PATCH] Avoid duplicate running of pud_offset and pmd_offset in one_md_table_init() Zhaolei
2008-10-31 10:03 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox