mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Kravetz <kravetz@us.ibm.com>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc64-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	lhms-devel@lists.sourceforge.net
Subject: [PATCH 3/4] Memory Add Fixes for ppc64
Date: Fri, 4 Nov 2005 15:20:24 -0800	[thread overview]
Message-ID: <20051104232024.GD25545@w-mikek2.ibm.com> (raw)
In-Reply-To: <20051104231552.GA25545@w-mikek2.ibm.com>

This is a temporary kludge that supports adding all new memory to
node 0.  I will provide a more complete solution similar to that
used for dynamically added CPUs in a few days.

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>

diff -Naupr linux-2.6.14-git7/include/asm-ppc64/mmzone.h linux-2.6.14-git7.work/include/asm-ppc64/mmzone.h
--- linux-2.6.14-git7/include/asm-ppc64/mmzone.h	2005-11-04 21:21:09.000000000 +0000
+++ linux-2.6.14-git7.work/include/asm-ppc64/mmzone.h	2005-11-04 22:10:44.000000000 +0000
@@ -33,6 +33,9 @@ extern int numa_cpu_lookup_table[];
 extern char *numa_memory_lookup_table;
 extern cpumask_t numa_cpumask_lookup_table[];
 extern int nr_cpus_in_node[];
+#ifdef CONFIG_MEMORY_HOTPLUG
+extern unsigned long max_pfn;
+#endif
 
 /* 16MB regions */
 #define MEMORY_INCREMENT_SHIFT 24
@@ -45,6 +48,11 @@ static inline int pa_to_nid(unsigned lon
 {
 	int nid;
 
+#ifdef CONFIG_MEMORY_HOTPLUG
+	/* kludge hot added sections default to node 0 */
+	if (pa >= (max_pfn << PAGE_SHIFT))
+		return 0;
+#endif
 	nid = numa_memory_lookup_table[pa >> MEMORY_INCREMENT_SHIFT];
 
 #ifdef DEBUG_NUMA

  parent reply	other threads:[~2005-11-04 23:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-04 23:15 [PATCH 0/4] " Mike Kravetz
2005-11-04 23:18 ` [PATCH 1/4] " Mike Kravetz
2005-11-05  0:04   ` Benjamin Herrenschmidt
2005-11-05  0:35     ` Mike Kravetz
2005-11-05  0:43       ` Benjamin Herrenschmidt
2005-11-07 20:47     ` Mike Kravetz
2005-11-07 21:12       ` Benjamin Herrenschmidt
2005-11-07 21:48         ` Mike Kravetz
2005-11-08  0:35           ` Benjamin Herrenschmidt
2005-11-08 14:51       ` Andy Whitcroft
2005-11-08  0:25     ` [PATCH 1/4] revised " Mike Kravetz
2005-11-08  2:07       ` Paul Mackerras
2005-11-08  3:02         ` Mike Kravetz
2005-11-04 23:19 ` [PATCH 2/4] " Mike Kravetz
2005-11-04 23:20 ` Mike Kravetz [this message]
2005-11-04 23:21 ` [PATCH 4/4] " Mike Kravetz
2005-11-07  0:59   ` Paul Mackerras
2005-11-07 17:39     ` Mike Kravetz
2005-11-08  0:39 ` [PATCH 0/4] " Anton Blanchard
2005-11-08  0:48   ` Mike Kravetz

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=20051104232024.GD25545@w-mikek2.ibm.com \
    --to=kravetz@us.ibm.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@ozlabs.org \
    --cc=paulus@samba.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

Powered by JetHome