memblock, bootmem: restore goal for alloc_low
authorYinghai Lu <yinghai@kernel.org>
Thu, 30 Jan 2014 23:45:44 +0000 (15:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jan 2014 00:56:54 +0000 (16:56 -0800)
Now we have memblock_virt_alloc_low to replace original bootmem api in
swiotlb.

But we should not use BOOTMEM_LOW_LIMIT for arch that does not support
CONFIG_NOBOOTMEM, as old api take 0.

| #define alloc_bootmem_low(x) \
|        __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0)
|#define alloc_bootmem_low_pages_nopanic(x) \
|        __alloc_bootmem_low_nopanic(x, PAGE_SIZE, 0)

and we have
 #define BOOTMEM_LOW_LIMIT __pa(MAX_DMA_ADDRESS)
for CONFIG_NOBOOTMEM.

Restore goal to 0 to fix ia64 crash, that Tony found.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Reported-by: Tony Luck <tony.luck@gmail.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/bootmem.h

index b388223bd4a9a9c1b5d91f8b1217fe57b328d940..db51fe4fe3172973a26a9fe739f271ca253bfdc3 100644 (file)
@@ -264,7 +264,7 @@ static inline void * __init memblock_virt_alloc_low(
 {
        if (!align)
                align = SMP_CACHE_BYTES;
-       return __alloc_bootmem_low(size, align, BOOTMEM_LOW_LIMIT);
+       return __alloc_bootmem_low(size, align, 0);
 }
 
 static inline void * __init memblock_virt_alloc_low_nopanic(
@@ -272,7 +272,7 @@ static inline void * __init memblock_virt_alloc_low_nopanic(
 {
        if (!align)
                align = SMP_CACHE_BYTES;
-       return __alloc_bootmem_low_nopanic(size, align, BOOTMEM_LOW_LIMIT);
+       return __alloc_bootmem_low_nopanic(size, align, 0);
 }
 
 static inline void * __init memblock_virt_alloc_from_nopanic(