mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/mm: Assign the initail value to the pmd_idx
@ 2015-07-12 12:18 Minfei Huang
  2015-07-20  7:26 ` Minfei Huang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Minfei Huang @ 2015-07-12 12:18 UTC (permalink / raw)
  To: tglx, mingo, hpa, akpm, tony.luck, wangnan0, david.vrabel, yinghai
  Cc: x86, linux-kernel, Minfei Huang

From: Minfei Huang <mnfhuang@gmail.com>

The variable pmd_idx is undefined, when we try to start the loop to
calculate the page.

Assign the proper value which indexes the start address to make it work
well.

Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
---
 arch/x86/mm/init_32.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 8340e45..68aec42 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -137,6 +137,7 @@ page_table_range_init_count(unsigned long start, unsigned long end)
 
 	vaddr = start;
 	pgd_idx = pgd_index(vaddr);
+	pmd_idx = pmd_index(vaddr);
 
 	for ( ; (pgd_idx < PTRS_PER_PGD) && (vaddr != end); pgd_idx++) {
 		for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
-- 
2.2.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-20 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-12 12:18 [PATCH] x86/mm: Assign the initail value to the pmd_idx Minfei Huang
2015-07-20  7:26 ` Minfei Huang
2015-07-20 18:28 ` Yinghai Lu
2015-07-20 21:18 ` [tip:x86/mm] x86/mm: Initialize pmd_idx in page_table_range_init_count() tip-bot for Minfei Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome