From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiang Liu Subject: [PATCH v4, part3 03/41] c6x: normalize global variables exported by vmlinux.lds Date: Sat, 6 Apr 2013 22:32:02 +0800 Message-ID: <1365258760-30821-4-git-send-email-jiang.liu@huawei.com> References: <1365258760-30821-1-git-send-email-jiang.liu@huawei.com> Return-path: In-Reply-To: <1365258760-30821-1-git-send-email-jiang.liu@huawei.com> Sender: linux-kernel-owner@vger.kernel.org To: Andrew Morton Cc: Jiang Liu , David Rientjes , Wen Congyang , Mel Gorman , Minchan Kim , KAMEZAWA Hiroyuki , Michal Hocko , James Bottomley , Sergei Shtylyov , David Howells , Mark Salter , Jianguo Wu , linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org List-Id: linux-arch.vger.kernel.org Normalize global variables exported by vmlinux.lds to conform usage guidelines from include/asm-generic/sections.h. Use _text to mark the start of the kernel image including the head text, and _stext to mark the start of the .text section. This patch also fixes possible bugs due to current address layout that [__init_begin, __init_end] is a sub-range of [_stext, _etext] and pages within range [__init_begin, __init_end] will be freed by free_initmem(). Signed-off-by: Jiang Liu Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Cc: linux-kernel@vger.kernel.org --- arch/c6x/kernel/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S index 1d81c4c..279d807 100644 --- a/arch/c6x/kernel/vmlinux.lds.S +++ b/arch/c6x/kernel/vmlinux.lds.S @@ -54,16 +54,15 @@ SECTIONS } . = ALIGN(PAGE_SIZE); + __init_begin = .; .init : { - _stext = .; _sinittext = .; HEAD_TEXT INIT_TEXT _einittext = .; } - __init_begin = _stext; INIT_DATA_SECTION(16) PERCPU_SECTION(128) @@ -74,6 +73,7 @@ SECTIONS .text : { _text = .; + _stext = .; TEXT_TEXT SCHED_TEXT LOCK_TEXT -- 1.7.9.5 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-da0-f50.google.com ([209.85.210.50]:41719 "EHLO mail-da0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423096Ab3DFOmV (ORCPT ); Sat, 6 Apr 2013 10:42:21 -0400 From: Jiang Liu Subject: [PATCH v4, part3 03/41] c6x: normalize global variables exported by vmlinux.lds Date: Sat, 6 Apr 2013 22:32:02 +0800 Message-ID: <1365258760-30821-4-git-send-email-jiang.liu@huawei.com> In-Reply-To: <1365258760-30821-1-git-send-email-jiang.liu@huawei.com> References: <1365258760-30821-1-git-send-email-jiang.liu@huawei.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrew Morton Cc: Jiang Liu , David Rientjes , Wen Congyang , Mel Gorman , Minchan Kim , KAMEZAWA Hiroyuki , Michal Hocko , James Bottomley , Sergei Shtylyov , David Howells , Mark Salter , Jianguo Wu , linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org Message-ID: <20130406143202.bQM6v2qyFjZwXhB_ImJtlI4FAtTwRR-fCyuG3cguqLk@z> Normalize global variables exported by vmlinux.lds to conform usage guidelines from include/asm-generic/sections.h. Use _text to mark the start of the kernel image including the head text, and _stext to mark the start of the .text section. This patch also fixes possible bugs due to current address layout that [__init_begin, __init_end] is a sub-range of [_stext, _etext] and pages within range [__init_begin, __init_end] will be freed by free_initmem(). Signed-off-by: Jiang Liu Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Cc: linux-kernel@vger.kernel.org --- arch/c6x/kernel/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S index 1d81c4c..279d807 100644 --- a/arch/c6x/kernel/vmlinux.lds.S +++ b/arch/c6x/kernel/vmlinux.lds.S @@ -54,16 +54,15 @@ SECTIONS } . = ALIGN(PAGE_SIZE); + __init_begin = .; .init : { - _stext = .; _sinittext = .; HEAD_TEXT INIT_TEXT _einittext = .; } - __init_begin = _stext; INIT_DATA_SECTION(16) PERCPU_SECTION(128) @@ -74,6 +73,7 @@ SECTIONS .text : { _text = .; + _stext = .; TEXT_TEXT SCHED_TEXT LOCK_TEXT -- 1.7.9.5