All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Yasunori Goto <y-goto@jp.fujitsu.com>,
	Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Christoph Lameter <clameter@sgi.com>
Subject: [PATCH 4 of 6] hotplug-memory: use common online_page
Date: Thu, 03 Apr 2008 17:05:44 -0700	[thread overview]
Message-ID: <a2a6c0b2e3fdc19d18b4.1207267544@localhost> (raw)
In-Reply-To: <patchbomb.1207267540@localhost>

Apart from x86-32, all architectures use an identical online_page.
Define it weakly in mm/memory_hotplug.c so that architectures can
override it if necessary.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
 arch/ia64/mm/init.c   |    9 ---------
 arch/powerpc/mm/mem.c |    9 ---------
 arch/sh/mm/init.c     |    9 ---------
 arch/x86/mm/init_64.c |    9 ---------
 mm/memory_hotplug.c   |    9 +++++++++
 5 files changed, 9 insertions(+), 36 deletions(-)

diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -690,15 +690,6 @@
 }
 
 #ifdef CONFIG_MEMORY_HOTPLUG
-void online_page(struct page *page)
-{
-	ClearPageReserved(page);
-	init_page_count(page);
-	__free_page(page);
-	totalram_pages++;
-	num_physpages++;
-}
-
 int arch_add_memory(int nid, u64 start, u64 size)
 {
 	pg_data_t *pgdat;
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -94,15 +94,6 @@
 EXPORT_SYMBOL(phys_mem_access_prot);
 
 #ifdef CONFIG_MEMORY_HOTPLUG
-
-void online_page(struct page *page)
-{
-	ClearPageReserved(page);
-	init_page_count(page);
-	__free_page(page);
-	totalram_pages++;
-	num_physpages++;
-}
 
 #ifdef CONFIG_NUMA
 int memory_add_physaddr_to_nid(u64 start)
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -307,15 +307,6 @@
 #endif
 
 #ifdef CONFIG_MEMORY_HOTPLUG
-void online_page(struct page *page)
-{
-	ClearPageReserved(page);
-	init_page_count(page);
-	__free_page(page);
-	totalram_pages++;
-	num_physpages++;
-}
-
 int arch_add_memory(int nid, u64 start, u64 size)
 {
 	pg_data_t *pgdat;
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -624,15 +624,6 @@
 /*
  * Memory hotplug specific functions
  */
-void online_page(struct page *page)
-{
-	ClearPageReserved(page);
-	init_page_count(page);
-	__free_page(page);
-	totalram_pages++;
-	num_physpages++;
-}
-
 #ifdef CONFIG_MEMORY_HOTPLUG
 /*
  * Memory is added always to NORMAL zone. This means you will never get
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -145,6 +145,15 @@
 
 	pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) -
 					pgdat->node_start_pfn;
+}
+
+__weak void online_page(struct page *page)
+{
+	ClearPageReserved(page);
+	init_page_count(page);
+	__free_page(page);
+	totalram_pages++;
+	num_physpages++;
 }
 
 static void grow_zone_span(unsigned long start_pfn, unsigned long end_pfn)



  parent reply	other threads:[~2008-04-04  0:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04  0:05 [PATCH 0 of 6] [RFC] another attempt at making hotplug memory and xen play together Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 1 of 6] hotplug-memory: refactor online_pages to separate zone growth from page onlining Jeremy Fitzhardinge
2008-04-04  1:06   ` Dave Hansen
2008-04-04  1:20     ` Jeremy Fitzhardinge
2008-04-04  1:33       ` Dave Hansen
2008-04-04  1:09   ` Dave Hansen
2008-04-04  1:32     ` Jeremy Fitzhardinge
2008-04-04  1:41       ` Dave Hansen
2008-04-04  1:56   ` Yasunori Goto
2008-04-04  5:34     ` Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 2 of 6] xen: make phys_to_machine structure dynamic Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 3 of 6] xen-balloon: use memory hot-add to expand the domain's memory Jeremy Fitzhardinge
2008-04-04  0:05 ` Jeremy Fitzhardinge [this message]
2008-04-04  0:47   ` [PATCH 4 of 6] hotplug-memory: use common online_page Dave Hansen
2008-04-04  0:56     ` Jeremy Fitzhardinge
2008-04-04  1:00       ` Dave Hansen
2008-04-04  1:11         ` Jeremy Fitzhardinge
2008-04-04  1:22           ` Dave Hansen
2008-04-04  0:05 ` [PATCH 5 of 6] hotplug-memory: add section_ops Jeremy Fitzhardinge
2008-04-04  0:51   ` Dave Hansen
2008-04-04  1:12     ` Jeremy Fitzhardinge
2008-04-04  1:52       ` Dave Hansen
2008-04-04  5:32         ` Jeremy Fitzhardinge
2008-04-04 14:22           ` Dave Hansen
2008-04-04 18:21             ` Jeremy Fitzhardinge
2008-04-04 19:28               ` Christoph Lameter
2008-04-04 20:38                 ` Jeremy Fitzhardinge
2008-04-04  1:47     ` KAMEZAWA Hiroyuki
2008-04-04  5:35       ` Jeremy Fitzhardinge
2008-04-04  0:05 ` [PATCH 6 of 6] xen-balloon: define a section_ops Jeremy Fitzhardinge

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=a2a6c0b2e3fdc19d18b4.1207267544@localhost \
    --to=jeremy@goop.org \
    --cc=clameter@sgi.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=y-goto@jp.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.