diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2016-01-15 19:57:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-15 20:56:32 -0500 |
commit | 036fbb21de7c74d5637bf41110c47005363f3000 (patch) | |
tree | 381358d8baa91fddd34fe08a3524b3f0a071c193 /include/linux/memblock.h | |
parent | fef8953ae4e2b87392434a1a3774694c3f8164f6 (diff) |
memblock: fix section mismatch
allmodconfig produces following warning for me:
WARNING: vmlinux.o(.text.unlikely+0x10314): Section mismatch in reference from the function movable_node_is_enabled() to the variable .meminit.data:movable_node_enabled
The function movable_node_is_enabled() references
the variable __meminitdata movable_node_enabled.
This is often because movable_node_is_enabled lacks a __meminitdata
annotation or the annotation of movable_node_enabled is wrong.
Let's mark the function with __meminit. It fixes the warning.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/memblock.h')
-rw-r--r-- | include/linux/memblock.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 173fb44e22f1..3106ac1c895e 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h | |||
@@ -61,6 +61,14 @@ extern int memblock_debug; | |||
61 | extern bool movable_node_enabled; | 61 | extern bool movable_node_enabled; |
62 | #endif /* CONFIG_MOVABLE_NODE */ | 62 | #endif /* CONFIG_MOVABLE_NODE */ |
63 | 63 | ||
64 | #ifdef CONFIG_ARCH_DISCARD_MEMBLOCK | ||
65 | #define __init_memblock __meminit | ||
66 | #define __initdata_memblock __meminitdata | ||
67 | #else | ||
68 | #define __init_memblock | ||
69 | #define __initdata_memblock | ||
70 | #endif | ||
71 | |||
64 | #define memblock_dbg(fmt, ...) \ | 72 | #define memblock_dbg(fmt, ...) \ |
65 | if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 73 | if (memblock_debug) printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
66 | 74 | ||
@@ -166,7 +174,7 @@ static inline bool memblock_is_hotpluggable(struct memblock_region *m) | |||
166 | return m->flags & MEMBLOCK_HOTPLUG; | 174 | return m->flags & MEMBLOCK_HOTPLUG; |
167 | } | 175 | } |
168 | 176 | ||
169 | static inline bool movable_node_is_enabled(void) | 177 | static inline bool __init_memblock movable_node_is_enabled(void) |
170 | { | 178 | { |
171 | return movable_node_enabled; | 179 | return movable_node_enabled; |
172 | } | 180 | } |
@@ -405,14 +413,6 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo | |||
405 | for (idx = 0; idx < memblock_type->cnt; \ | 413 | for (idx = 0; idx < memblock_type->cnt; \ |
406 | idx++,rgn = &memblock_type->regions[idx]) | 414 | idx++,rgn = &memblock_type->regions[idx]) |
407 | 415 | ||
408 | #ifdef CONFIG_ARCH_DISCARD_MEMBLOCK | ||
409 | #define __init_memblock __meminit | ||
410 | #define __initdata_memblock __meminitdata | ||
411 | #else | ||
412 | #define __init_memblock | ||
413 | #define __initdata_memblock | ||
414 | #endif | ||
415 | |||
416 | #ifdef CONFIG_MEMTEST | 416 | #ifdef CONFIG_MEMTEST |
417 | extern void early_memtest(phys_addr_t start, phys_addr_t end); | 417 | extern void early_memtest(phys_addr_t start, phys_addr_t end); |
418 | #else | 418 | #else |