diff options
author | Yinghai Lu <yinghai@kernel.org> | 2014-01-30 18:45:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-30 19:56:54 -0500 |
commit | 07bacb3826d613bb651297a201dd2df8dd4fdee5 (patch) | |
tree | 298e1179b1a8a83aea33c2e3193d2f8e5c01dd8a /include/linux/bootmem.h | |
parent | 53d8ab29f8f6d67e37857b68189b38fa3d87dd8e (diff) |
memblock, bootmem: restore goal for alloc_low
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>
Diffstat (limited to 'include/linux/bootmem.h')
-rw-r--r-- | include/linux/bootmem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index b388223bd4a9..db51fe4fe317 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -264,7 +264,7 @@ static inline void * __init memblock_virt_alloc_low( | |||
264 | { | 264 | { |
265 | if (!align) | 265 | if (!align) |
266 | align = SMP_CACHE_BYTES; | 266 | align = SMP_CACHE_BYTES; |
267 | return __alloc_bootmem_low(size, align, BOOTMEM_LOW_LIMIT); | 267 | return __alloc_bootmem_low(size, align, 0); |
268 | } | 268 | } |
269 | 269 | ||
270 | static inline void * __init memblock_virt_alloc_low_nopanic( | 270 | static inline void * __init memblock_virt_alloc_low_nopanic( |
@@ -272,7 +272,7 @@ static inline void * __init memblock_virt_alloc_low_nopanic( | |||
272 | { | 272 | { |
273 | if (!align) | 273 | if (!align) |
274 | align = SMP_CACHE_BYTES; | 274 | align = SMP_CACHE_BYTES; |
275 | return __alloc_bootmem_low_nopanic(size, align, BOOTMEM_LOW_LIMIT); | 275 | return __alloc_bootmem_low_nopanic(size, align, 0); |
276 | } | 276 | } |
277 | 277 | ||
278 | static inline void * __init memblock_virt_alloc_from_nopanic( | 278 | static inline void * __init memblock_virt_alloc_from_nopanic( |