diff options
author | Yinghai Lu <yinghai@kernel.org> | 2010-07-28 01:43:02 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 22:56:33 -0400 |
commit | 10d0643988e976360eb3497dcafb55b393b8e480 (patch) | |
tree | fa8f614dd7ab2ffc2f94700451e6c9e6d26c702e /include/linux/memblock.h | |
parent | f0b37fad9a63217c39997b2d2b31f44e3d8be727 (diff) |
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>
Diffstat (limited to 'include/linux/memblock.h')
-rw-r--r-- | include/linux/memblock.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index c24b27849096..3978e6a8e824 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -149,6 +149,14 @@ static inline unsigned long memblock_region_pages(const struct memblock_region * | |||
149 | region++) | 149 | region++) |
150 | 150 | ||
151 | 151 | ||
152 | #ifdef ARCH_DISCARD_MEMBLOCK | ||
153 | #define __init_memblock __init | ||
154 | #define __initdata_memblock __initdata | ||
155 | #else | ||
156 | #define __init_memblock | ||
157 | #define __initdata_memblock | ||
158 | #endif | ||
159 | |||
152 | #endif /* CONFIG_HAVE_MEMBLOCK */ | 160 | #endif /* CONFIG_HAVE_MEMBLOCK */ |
153 | 161 | ||
154 | #endif /* __KERNEL__ */ | 162 | #endif /* __KERNEL__ */ |