From 2c88322bba5494ad223cc738a15f7ea6f9671ee1 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 17 Oct 2007 18:04:34 +0200 Subject: [PATCH] --- yaml --- r: 70959 b: refs/heads/master c: 509a80c49c512ac88bd67b981145f925a306111b h: refs/heads/master i: 70957: c80314b0c1a7d709f8fb807fbf1306ce3b6a1f2a 70955: 74ac3d6549e7a7b986ebfb6d6a30537966894edd 70951: 22630e0c26a58bbd00aa57e9f33ef991f0741ec2 70943: dda4f1c6fa87ea6bd6475ba52d0dd24e67656b71 v: v3 --- [refs] | 2 +- trunk/arch/x86/mm/init_32.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index de832a4eb578..54a7e87d61d2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1e3e19723ecd58149388f3eecbd3285825f64f3b +refs/heads/master: 509a80c49c512ac88bd67b981145f925a306111b diff --git a/trunk/arch/x86/mm/init_32.c b/trunk/arch/x86/mm/init_32.c index dda4e83649a0..e4e37d4f4c52 100644 --- a/trunk/arch/x86/mm/init_32.c +++ b/trunk/arch/x86/mm/init_32.c @@ -85,13 +85,20 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd) static pte_t * __init one_page_table_init(pmd_t *pmd) { if (!(pmd_val(*pmd) & _PAGE_PRESENT)) { - pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); + pte_t *page_table = NULL; + +#ifdef CONFIG_DEBUG_PAGEALLOC + page_table = (pte_t *) alloc_bootmem_pages(PAGE_SIZE); +#endif + if (!page_table) + page_table = + (pte_t *)alloc_bootmem_low_pages(PAGE_SIZE); paravirt_alloc_pt(&init_mm, __pa(page_table) >> PAGE_SHIFT); set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE)); BUG_ON(page_table != pte_offset_kernel(pmd, 0)); } - + return pte_offset_kernel(pmd, 0); }