linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <liuj97@gmail.com>
To: Jonas Bonn <jonas@southpole.se>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Jiang Liu <jiang.liu@huawei.com>,
	Wen Congyang <wency@cn.fujitsu.com>, Mel Gorman <mgorman@suse.de>,
	Minchan Kim <minchan@kernel.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Michal Hocko <mhocko@suse.cz>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	David Howells <dhowells@redhat.com>,
	Mark Salter <msalter@redhat.com>,
	Jianguo Wu <wujianguo@huawei.com>,
	linux-mm@kvack.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	linux@lists.openrisc.net
Subject: Re: [PATCH v3, part4 26/39] mm/openrisc: prepare for removing num_physpages and simplify mem_init()
Date: Tue, 02 Apr 2013 22:38:48 +0800	[thread overview]
Message-ID: <515AED78.7000909@gmail.com> (raw)
In-Reply-To: <515A6D40.90702@southpole.se>

Hi Jonas,
	Thanks for testing.
	Regards!
	Gerry
On 04/02/2013 01:31 PM, Jonas Bonn wrote:
> On 03/26/2013 04:54 PM, Jiang Liu wrote:
>> Prepare for removing num_physpages and simplify mem_init().
>>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>> Cc: Jonas Bonn <jonas@southpole.se>
>> Cc: David Howells <dhowells@redhat.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: linux@lists.openrisc.net
>> Cc: linux-kernel@vger.kernel.org
> 
> Tested and works fine on OpenRISC.
> 
> Acked-by: Jonas Bonn <jonas@southpole.se>
> 
> /Jonas
> 
>> ---
>> Hi all,
>>     Sorry for my mistake that my previous patch series has been screwed up.
>> So I regenerate a third version and also set up a git tree at:
>>     git://github.com/jiangliu/linux.git mem_init
>>     Any help to review and test are welcomed!
>>
>>     Regards!
>>     Gerry
>> ---
>>   arch/openrisc/mm/init.c |   44 ++++----------------------------------------
>>   1 file changed, 4 insertions(+), 40 deletions(-)
>>
>> diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c
>> index 71d6b40..f3c8f47 100644
>> --- a/arch/openrisc/mm/init.c
>> +++ b/arch/openrisc/mm/init.c
>> @@ -191,56 +191,20 @@ void __init paging_init(void)
>>     /* References to section boundaries */
>>   -static int __init free_pages_init(void)
>> -{
>> -    int reservedpages, pfn;
>> -
>> -    /* this will put all low memory onto the freelists */
>> -    free_all_bootmem();
>> -
>> -    reservedpages = 0;
>> -    for (pfn = 0; pfn < max_low_pfn; pfn++) {
>> -        /*
>> -         * Only count reserved RAM pages
>> -         */
>> -        if (PageReserved(mem_map + pfn))
>> -            reservedpages++;
>> -    }
>> -
>> -    return reservedpages;
>> -}
>> -
>> -static void __init set_max_mapnr_init(void)
>> -{
>> -    max_mapnr = num_physpages = max_low_pfn;
>> -}
>> -
>>   void __init mem_init(void)
>>   {
>> -    int codesize, reservedpages, datasize, initsize;
>> -
>>       BUG_ON(!mem_map);
>>   -    set_max_mapnr_init();
>> -
>> +    max_mapnr = max_low_pfn;
>>       high_memory = (void *)__va(max_low_pfn * PAGE_SIZE);
>>         /* clear the zero-page */
>>       memset((void *)empty_zero_page, 0, PAGE_SIZE);
>>   -    reservedpages = free_pages_init();
>> -
>> -    codesize = (unsigned long)&_etext - (unsigned long)&_stext;
>> -    datasize = (unsigned long)&_edata - (unsigned long)&_etext;
>> -    initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin;
>> +    /* this will put all low memory onto the freelists */
>> +    free_all_bootmem();
>>   -    printk(KERN_INFO
>> -           "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n",
>> -           (unsigned long)nr_free_pages() << (PAGE_SHIFT - 10),
>> -           max_mapnr << (PAGE_SHIFT - 10), codesize >> 10,
>> -           reservedpages << (PAGE_SHIFT - 10), datasize >> 10,
>> -           initsize >> 10, (unsigned long)(0 << (PAGE_SHIFT - 10))
>> -        );
>> +    mem_init_print_info(NULL);
>>         printk("mem_init_done ...........................................\n");
>>       mem_init_done = 1;
> 
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-04-02 14:39 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-26 15:54 [PATCH v3, part4 00/39] Simplify mem_init() implementations and kill num_physpages Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 01/39] vmlinux.lds: add comments for global variables and clean up useless declarations Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 02/39] avr32: normalize global variables exported by vmlinux.lds Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 03/39] c6x: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 04/39] h8300: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 05/39] score: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 06/39] tile: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 07/39] UML: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 08/39] mm: introduce helper function mem_init_print_info() to simplify mem_init() Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 09/39] mm: use totalram_pages instead of num_physpages at runtime Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 10/39] mm/alpha: prepare for removing num_physpages and simplify mem_init() Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 11/39] mm/ARM: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 12/39] mm/ARM64: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 13/39] mm/AVR32: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 14/39] mm/blackfin: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 15/39] mm/c6x: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 16/39] mm/cris: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 17/39] mm/frv: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 18/39] mm/h8300: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 19/39] mm/hexagon: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 20/39] mm/IA64: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 21/39] mm/m32r: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 22/39] mm/m68k: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 23/39] mm/microblaze: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 24/39] mm/MIPS: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 25/39] mm/mn10300: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 26/39] mm/openrisc: " Jiang Liu
2013-04-02  5:31   ` Jonas Bonn
2013-04-02 14:38     ` Jiang Liu [this message]
2013-03-26 15:54 ` [PATCH v3, part4 27/39] mm/PARISC: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 28/39] mm/ppc: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 29/39] mm/s390: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 30/39] mm/score: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 31/39] mm/SH: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 32/39] mm/SPARC: " Jiang Liu
2013-03-29 16:17   ` Sam Ravnborg
2013-03-26 15:54 ` [PATCH v3, part4 33/39] mm/tile: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 34/39] mm/um: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 35/39] mm/unicore32: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 36/39] mm/x86: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 37/39] mm/xtensa: " Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 38/39] mm/hotplug: prepare for removing num_physpages Jiang Liu
2013-03-29 11:18   ` Sam Ravnborg
2013-03-29 15:36     ` Jiang Liu
2013-03-29 16:17       ` Sam Ravnborg
2013-03-29 16:30         ` Jiang Liu
2013-03-29 16:40           ` Sam Ravnborg
2013-03-29 16:42             ` Jiang Liu
2013-03-26 15:54 ` [PATCH v3, part4 39/39] mm: kill global variable num_physpages Jiang Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=515AED78.7000909@gmail.com \
    --to=liuj97@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dhowells@redhat.com \
    --cc=jiang.liu@huawei.com \
    --cc=jonas@southpole.se \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@lists.openrisc.net \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=minchan@kernel.org \
    --cc=msalter@redhat.com \
    --cc=rientjes@google.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=wency@cn.fujitsu.com \
    --cc=wujianguo@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).