linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <liuj97@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Yinghai Lu <yinghai@kernel.org>
Cc: Jiang Liu <jiang.liu@huawei.com>,
	David Rientjes <rientjes@google.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>,
	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, Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	linux-alpha@vger.kernel.org
Subject: [RFC PATCH v1 18/19] mm/alpha: unify mem_init() for both UMA and NUMA architectures
Date: Sat, 13 Apr 2013 23:36:38 +0800	[thread overview]
Message-ID: <1365867399-21323-19-git-send-email-jiang.liu@huawei.com> (raw)
In-Reply-To: <1365867399-21323-1-git-send-email-jiang.liu@huawei.com>

Now mem_init() for both Alpha UMA and Alpha NUMA are the same,
so unify it to reduce duplicated code.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/alpha/mm/init.c |    7 ++-----
 arch/alpha/mm/numa.c |   10 ----------
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index 04c933c..39de408 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -276,17 +276,14 @@ srm_paging_stop (void)
 }
 #endif
 
-#ifndef CONFIG_DISCONTIGMEM
 void __init
 mem_init(void)
 {
-	max_mapnr = max_low_pfn;
-	free_all_bootmem();
+	set_max_mapnr(max_low_pfn);
 	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
-
+	free_all_bootmem();
 	mem_init_print_info(NULL);
 }
-#endif /* CONFIG_DISCONTIGMEM */
 
 void
 free_initmem(void)
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index 0894b3a8..d543d71 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -319,13 +319,3 @@ void __init paging_init(void)
 	/* Initialize the kernel's ZERO_PGE. */
 	memset((void *)ZERO_PGE, 0, PAGE_SIZE);
 }
-
-void __init mem_init(void)
-{
-	high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
-	free_all_bootmem();
-	mem_init_print_info(NULL);
-#if 0
-	mem_stress();
-#endif
-}
-- 
1.7.9.5

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Jiang Liu <liuj97@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Yinghai Lu <yinghai@kernel.org>
Cc: Jiang Liu <jiang.liu@huawei.com>,
	David Rientjes <rientjes@google.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>,
	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, Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	linux-alpha@vger.kernel.org
Subject: [RFC PATCH v1 18/19] mm/alpha: unify mem_init() for both UMA and NUMA architectures
Date: Sat, 13 Apr 2013 23:36:38 +0800	[thread overview]
Message-ID: <1365867399-21323-19-git-send-email-jiang.liu@huawei.com> (raw)
Message-ID: <20130413153638.NrCzQDgNyWIA7lh6nntexpkbCgqOH5fw_64VvOYxKCc@z> (raw)
In-Reply-To: <1365867399-21323-1-git-send-email-jiang.liu@huawei.com>

Now mem_init() for both Alpha UMA and Alpha NUMA are the same,
so unify it to reduce duplicated code.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: linux-alpha@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 arch/alpha/mm/init.c |    7 ++-----
 arch/alpha/mm/numa.c |   10 ----------
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index 04c933c..39de408 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -276,17 +276,14 @@ srm_paging_stop (void)
 }
 #endif
 
-#ifndef CONFIG_DISCONTIGMEM
 void __init
 mem_init(void)
 {
-	max_mapnr = max_low_pfn;
-	free_all_bootmem();
+	set_max_mapnr(max_low_pfn);
 	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
-
+	free_all_bootmem();
 	mem_init_print_info(NULL);
 }
-#endif /* CONFIG_DISCONTIGMEM */
 
 void
 free_initmem(void)
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index 0894b3a8..d543d71 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -319,13 +319,3 @@ void __init paging_init(void)
 	/* Initialize the kernel's ZERO_PGE. */
 	memset((void *)ZERO_PGE, 0, PAGE_SIZE);
 }
-
-void __init mem_init(void)
-{
-	high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
-	free_all_bootmem();
-	mem_init_print_info(NULL);
-#if 0
-	mem_stress();
-#endif
-}
-- 
1.7.9.5


  parent reply	other threads:[~2013-04-13 15:36 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13 15:36 [RFC PATCH v1 00/19] kill free_all_bootmem() and clean up VALID_PAGE() Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 01/19] mm: introduce accessor function set_max_mapnr() Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 02/19] mm/AVR32: prepare for killing free_all_bootmem_node() Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 03/19] mm/IA64: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 04/19] mm/m32r: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 05/19] mm/m68k: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 06/19] mm/metag: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 07/19] mm/MIPS: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 08/19] mm/PARISC: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 09/19] mm/PPC: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 10/19] mm/SH: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 11/19] mm: kill free_all_bootmem_node() Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 12/19] mm/ALPHA: clean up unused VALID_PAGE() Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 13/19] mm/CRIS: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-15 13:14   ` Jesper Nilsson
2013-04-13 15:36 ` [RFC PATCH v1 14/19] mm/microblaze: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 15/19] mm/ARM: fix stale comment about VALID_PAGE() Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 16/19] mm/unicore32: " Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-15 19:11   ` Xuetao Guan
2013-04-15 19:11     ` Xuetao Guan
2013-04-13 15:36 ` [RFC PATCH v1 17/19] mm/m68k: fix build warning of unused variable Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-13 15:36 ` Jiang Liu [this message]
2013-04-13 15:36   ` [RFC PATCH v1 18/19] mm/alpha: unify mem_init() for both UMA and NUMA architectures Jiang Liu
2013-04-13 15:36 ` [RFC PATCH v1 19/19] mm: call register_page_bootmem_info_node() from mm core Jiang Liu
2013-04-13 15:36   ` Jiang Liu
2013-04-15  4:56 ` [RFC PATCH v1 00/19] kill free_all_bootmem() and clean up VALID_PAGE() Paul Mackerras
2013-04-16 15:04   ` 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=1365867399-21323-19-git-send-email-jiang.liu@huawei.com \
    --to=liuj97@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jiang.liu@huawei.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mattst88@gmail.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=minchan@kernel.org \
    --cc=msalter@redhat.com \
    --cc=rientjes@google.com \
    --cc=rth@twiddle.net \
    --cc=wency@cn.fujitsu.com \
    --cc=wujianguo@huawei.com \
    --cc=yinghai@kernel.org \
    /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).