From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbcAEW1K (ORCPT ); Tue, 5 Jan 2016 17:27:10 -0500 Received: from mail113-249.mail.alibaba.com ([205.204.113.249]:47700 "EHLO us-alimail-mta2.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751815AbcAEW1J (ORCPT ); Tue, 5 Jan 2016 17:27:09 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1035513|-1;FP=0|0|0|0|0|-1|-1|-1;HT=e01l07381;MF=chengang@emindsoft.com.cn;NM=1;PH=DS;RN=13;RT=12;SR=0;TI=SMTPD_----4QL5FmS_1452032771; From: chengang@emindsoft.com.cn To: akpm@linux-foundation.org Cc: will.deacon@arm.com, tangchen@cn.fujitsu.com, kuleshovmail@gmail.com, tony.luck@intel.com, vladimir.murzin@arm.com, baiyaowei@cmss.chinamobile.com, holt@sgi.com, ard.biesheuvel@linaro.org, linux-kernel@vger.kernel.org, Chen Gang , Chen Gang Subject: [PATCH] include/linux/memblock.h: Use __init_memblock for movable_node_is_enabled Date: Wed, 6 Jan 2016 06:25:56 +0800 Message-Id: <1452032756-10196-1-git-send-email-chengang@emindsoft.com.cn> X-Mailer: git-send-email 1.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen Gang The related warning: LD mm/built-in.o WARNING: mm/built-in.o(.text.unlikely+0x155d): 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. Signed-off-by: Chen Gang --- include/linux/memblock.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 173fb44..976ac58 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -160,13 +160,21 @@ void __next_reserved_mem_region(u64 *idx, phys_addr_t *out_start, i != (u64)ULLONG_MAX; \ __next_reserved_mem_region(&i, p_start, p_end)) +#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK +#define __init_memblock __meminit +#define __initdata_memblock __meminitdata +#else +#define __init_memblock +#define __initdata_memblock +#endif + #ifdef CONFIG_MOVABLE_NODE static inline bool memblock_is_hotpluggable(struct memblock_region *m) { return m->flags & MEMBLOCK_HOTPLUG; } -static inline bool movable_node_is_enabled(void) +static inline bool __init_memblock movable_node_is_enabled(void) { return movable_node_enabled; } @@ -405,14 +413,6 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo for (idx = 0; idx < memblock_type->cnt; \ idx++,rgn = &memblock_type->regions[idx]) -#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK -#define __init_memblock __meminit -#define __initdata_memblock __meminitdata -#else -#define __init_memblock -#define __initdata_memblock -#endif - #ifdef CONFIG_MEMTEST extern void early_memtest(phys_addr_t start, phys_addr_t end); #else -- 1.9.3