Skip to content

Commit 07bacb3

Browse files
Yinghai Lutorvalds
authored andcommitted
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>
1 parent 53d8ab2 commit 07bacb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/bootmem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,15 @@ static inline void * __init memblock_virt_alloc_low(
264264
{
265265
if (!align)
266266
align = SMP_CACHE_BYTES;
267-
return __alloc_bootmem_low(size, align, BOOTMEM_LOW_LIMIT);
267+
return __alloc_bootmem_low(size, align, 0);
268268
}
269269

270270
static inline void * __init memblock_virt_alloc_low_nopanic(
271271
phys_addr_t size, phys_addr_t align)
272272
{
273273
if (!align)
274274
align = SMP_CACHE_BYTES;
275-
return __alloc_bootmem_low_nopanic(size, align, BOOTMEM_LOW_LIMIT);
275+
return __alloc_bootmem_low_nopanic(size, align, 0);
276276
}
277277

278278
static inline void * __init memblock_virt_alloc_from_nopanic(

0 commit comments

Comments
 (0)