x86/mm: Assign the initail value to the pmd_idx
PATCH 1/1 x86/mm: Assign the initail value to the pmd_idx
From: Minfei Huang <[email protected]>
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.
--- arch/x86/mm/init_32.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/mm/init_32.c +1 -0
@@ -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);
Signature · 1 line
2.2.2
ping.
Can someone help review this patch?
Thanks
Minfei
Quoted 28 lines · Minfei Huang
From: Minfei Huang <[email protected]>
The variable
pmd_idxis 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 <[email protected]>--- arch/x86/mm/init_32.c | 1 + 1 file changed, 1 insertion(+)arch/x86/mm/init_32.c +1
-0@@ -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);Signature · 1 line
2.2.2
Quoted 18 lines · Minfei Huang
From: Minfei Huang <[email protected]>
The variable
pmd_idxis 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 <[email protected]>--- arch/x86/mm/init_32.c | 1 + 1 file changed, 1 insertion(+)arch/x86/mm/init_32.c +0
-0
arch/x86/mm/init_32.c page_table_range_init_count(unsigned long start, unsigned long end) · line 143
Quoted 7 lines
arch/x86/mm/init_32.c +1
-0@@ -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);
tip-bot for Minfei Huang
merge bot[tip:x86/mm] x86/mm: Initialize pmd_idx in page_table_range_init_count()
In reply to Minfei Huangx86/mm: Initialize pmd_idx in page_table_range_init_count()
Commit-ID: 9962eea9e55f797f05f20ba6448929cab2a9f018 Gitweb: http://git.kernel.org/tip/9962eea9e55f797f05f20ba6448929cab2a9f018 Author: Minfei Huang <[email protected]> AuthorDate: Sun, 12 Jul 2015 20:18:42 +0800 Committer: Thomas Gleixner <[email protected]> CommitDate: Mon, 20 Jul 2015 23:14:47 +0200
x86/mm: Initialize pmd_idx in page_table_range_init_count()
The variable pmd_idx is not initialized for the first iteration of the for loop.
Assign the proper value which indexes the start address.
--- arch/x86/mm/init_32.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/mm/init_32.c +1 -0
@@ -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);