mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
f0b37fad9a
commit
10d0643988
2 changed files with 32 additions and 24 deletions
|
@ -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__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue