[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5151BD61.7020401@gmail.com>
Date: Tue, 26 Mar 2013 23:23:13 +0800
From: Jiang Liu <liuj97@...il.com>
To: Mark Salter <msalter@...hat.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
David Rientjes <rientjes@...gle.com>,
Jiang Liu <jiang.liu@...wei.com>,
Wen Congyang <wency@...fujitsu.com>,
Mel Gorman <mgorman@...e.de>, Minchan Kim <minchan@...nel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Michal Hocko <mhocko@...e.cz>,
Jianguo Wu <wujianguo@...wei.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Aurelien Jacquiot <a-jacquiot@...com>,
linux-c6x-dev@...ux-c6x.org
Subject: Re: [RFC PATCH v2, part4 03/39] c6x: normalize global variables exported
by vmlinux.lds
On 03/26/2013 01:56 AM, Mark Salter wrote:
> On Sun, 2013-03-24 at 15:24 +0800, Jiang Liu wrote:
>> 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().
>
> I won't have time to look at this in detail until later this week, but
> the reason for that layout is because c6x commonly stores text in flash.
> Not all of the xip support is in-tree yet, but when it is, we don't want
> to free init text.
Hi Mark,
Thanks for reminder. It's possible to support the usage case you
have described, please take a look at arch/tile/kernel/vmlinux.lds.S.
By that way, we could only free init.data sections without freeing init.text
sections.
Regards!
Gerry
>
> --Mark
>
>>
>> Signed-off-by: Jiang Liu <jiang.liu@...wei.com>
>> Cc: Mark Salter <msalter@...hat.com>
>> Cc: Aurelien Jacquiot <a-jacquiot@...com>
>> Cc: linux-c6x-dev@...ux-c6x.org
>> Cc: linux-kernel@...r.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
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists