Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751532AbbGLMPN (ORCPT ); Sun, 12 Jul 2015 08:15:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43183 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbbGLMPL (ORCPT ); Sun, 12 Jul 2015 08:15:11 -0400 From: Minfei Huang To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, akpm@linux-foundation.org, tony.luck@intel.com, wangnan0@huawei.com, david.vrabel@citrix.com, yinghai@kernel.org Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Minfei Huang Subject: [PATCH] x86/mm: Assign the initail value to the pmd_idx Date: Sun, 12 Jul 2015 20:18:42 +0800 Message-Id: <1436703522-29552-1-git-send-email-mhuang@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1015 Lines: 33 From: Minfei Huang 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/