x86: revert wrong memblock current limit setting
authorYinghai Lu <yinghai@kernel.org>
Tue, 28 Jan 2014 01:06:50 +0000 (17:06 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 28 Jan 2014 05:02:38 +0000 (21:02 -0800)
Dave reported big numa system booting is broken.

It turns out that commit 5b6e529521d3 ("x86: memblock: set current limit
to max low memory address") sets the limit to low wrongly.

max_low_pfn_mapped is different from max_pfn_mapped.
max_low_pfn_mapped is always under 4G.

That will memblock_alloc_nid all go under 4G.

Revert 5b6e529521d3 to fix a no-boot regression which was triggered by
457ff1de2d24 ("lib/swiotlb.c: use memblock apis for early memory
allocations").

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Reported-by: Dave Hansen <dave.hansen@intel.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/include/asm/page_types.h
arch/x86/kernel/setup.c

index 2f59cce3b38aaabb83efe9c528ffbfc7ea9ae8d8..f97fbe3abb67f5059d4e6f0a37261d6113df19de 100644 (file)
@@ -51,9 +51,9 @@ extern int devmem_is_allowed(unsigned long pagenr);
 extern unsigned long max_low_pfn_mapped;
 extern unsigned long max_pfn_mapped;
 
-static inline phys_addr_t get_max_low_mapped(void)
+static inline phys_addr_t get_max_mapped(void)
 {
-       return (phys_addr_t)max_low_pfn_mapped << PAGE_SHIFT;
+       return (phys_addr_t)max_pfn_mapped << PAGE_SHIFT;
 }
 
 bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn);
index c9675594d7caee907fd6fd78559fe14bf1aea036..06853e6703541f8349106e17330f86621fa984db 100644 (file)
@@ -1119,7 +1119,7 @@ void __init setup_arch(char **cmdline_p)
 
        setup_real_mode();
 
-       memblock_set_current_limit(get_max_low_mapped());
+       memblock_set_current_limit(get_max_mapped());
        dma_contiguous_reserve(0);
 
        /*