lkml.org 
[lkml]   [2015]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/mm: Assign the initail value to the pmd_idx
Date
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


\
 
 \ /
  Last update: 2015-07-12 14:21    [W:0.067 / U:2.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site