memblock: Option for the architecture to put memblock into the .init section
Arch code can define ARCH_DISCARD_MEMBLOCK in asm/memblock.h, which in turns causes memblock code and data to go respectively into the .init and .initdata sections. This will be used by the x86 architecture. If ARCH_DISCARD_MEMBLOCK is defined, the debugfs files to inspect the memblock arrays after boot are not created. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
f0b37fad9a
commit
10d0643988
@@ -149,6 +149,14 @@ static inline unsigned long memblock_region_pages(const struct memblock_region *
|
||||
region++)
|
||||
|
||||
|
||||
#ifdef ARCH_DISCARD_MEMBLOCK
|
||||
#define __init_memblock __init
|
||||
#define __initdata_memblock __initdata
|
||||
#else
|
||||
#define __init_memblock
|
||||
#define __initdata_memblock
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_HAVE_MEMBLOCK */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
Reference in New Issue
Block a user