diff mbox

mm/memblock: add missing include <linux/bootmem.h>

Message ID 20180615233236.GA17678@agluck-desk (mailing list archive)
State New, archived
Headers show

Commit Message

Tony Luck June 15, 2018, 11:32 p.m. UTC
This both compiles and boots on ia64.

Builds OK on x86_64 with an Enterprise OS .config that includes:
CONFIG_HAVE_MEMBLOCK=y
CONFIG_NO_BOOTMEM=y

-Tony

----
diff mbox

Patch

diff --git a/mm/memblock.c b/mm/memblock.c
index cc16d70b8333..0a54d488f767 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1225,6 +1225,7 @@  phys_addr_t __init memblock_alloc_try_nid(phys_addr_t size, phys_addr_t align, i
 	return memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ACCESSIBLE);
 }
 
+#if defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM)
 /**
  * memblock_virt_alloc_internal - allocate boot memory block
  * @size: size of memory block to be allocated in bytes
@@ -1432,6 +1433,7 @@  void * __init memblock_virt_alloc_try_nid(
 	      (u64)max_addr);
 	return NULL;
 }
+#endif
 
 /**
  * __memblock_free_early - free boot memory block