Commit 9da791df authored by Santosh Shilimkar's avatar Santosh Shilimkar Committed by Linus Torvalds
Browse files

kernel/printk/printk.c: use memblock apis for early memory allocations

Switch to memblock interfaces for early memory allocator instead of
bootmem allocator.  No functional change in beahvior than what it is in
current code from bootmem users points of view.

Archs already converted to NO_BOOTMEM now directly use memblock
interfaces instead of bootmem wrappers build on top of memblock.  And
the archs which still uses bootmem, these new apis just fallback to
exiting bootmem APIs.
Signed-off-by: default avatarGrygorii Strashko <>
Signed-off-by: default avatarSantosh Shilimkar <>
Cc: Yinghai Lu <>
Cc: Tejun Heo <>
Cc: "Rafael J. Wysocki" <>
Cc: Arnd Bergmann <>
Cc: Christoph Lameter <>
Cc: Greg Kroah-Hartman <>
Cc: H. Peter Anvin <>
Cc: Johannes Weiner <>
Cc: KAMEZAWA Hiroyuki <>
Cc: Konrad Rzeszutek Wilk <>
Cc: Michal Hocko <>
Cc: Paul Walmsley <>
Cc: Pavel Machek <>
Cc: Russell King <>
Cc: Tony Lindgren <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 098b081b
......@@ -757,14 +757,10 @@ void __init setup_log_buf(int early)
if (early) {
unsigned long mem;
mem = memblock_alloc(new_log_buf_len, PAGE_SIZE);
if (!mem)
new_log_buf = __va(mem);
new_log_buf =
memblock_virt_alloc(new_log_buf_len, PAGE_SIZE);
} else {
new_log_buf = alloc_bootmem_nopanic(new_log_buf_len);
new_log_buf = memblock_virt_alloc_nopanic(new_log_buf_len, 0);
if (unlikely(!new_log_buf)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment