From: Andy Whitcroft <apw@shadowen.org>
To: linuxppc64-dev@ozlabs.org, paulus@samba.org, anton@samba.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
apw@shadowen.org, haveblue@us.ibm.com, kravetz@us.ibm.com
Subject: [1/3] add early_pfn_to_nid for ppc64
Date: Wed, 04 May 2005 21:28:57 +0100 [thread overview]
Message-ID: <E1DTQUL-0002WE-D6@pinky.shadowen.org> (raw)
Provide an implementation of early_pfn_to_nid for PPC64. This is
used by memory models to determine the node from which to take
allocations before the memory allocators are fully initialised.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Martin Bligh <mbligh@aracnet.com>
---
arch/ppc64/Kconfig | 4 ++++
include/asm-ppc64/mmzone.h | 5 +++++
2 files changed, 9 insertions(+)
diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/ppc64/Kconfig current/arch/ppc64/Kconfig
--- reference/arch/ppc64/Kconfig 2005-05-04 20:54:41.000000000 +0100
+++ current/arch/ppc64/Kconfig 2005-05-04 20:54:48.000000000 +0100
@@ -211,6 +211,10 @@ config ARCH_FLATMEM_ENABLE
source "mm/Kconfig"
+config HAVE_ARCH_EARLY_PFN_TO_NID
+ bool
+ default y
+
# Some NUMA nodes have memory ranges that span
# other nodes. Even though a pfn is valid and
# between a node's start and end pfns, it may not
diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/include/asm-ppc64/mmzone.h current/include/asm-ppc64/mmzone.h
--- reference/include/asm-ppc64/mmzone.h 2005-05-04 20:54:41.000000000 +0100
+++ current/include/asm-ppc64/mmzone.h 2005-05-04 20:54:48.000000000 +0100
@@ -90,4 +90,9 @@ static inline int pa_to_nid(unsigned lon
#define discontigmem_pfn_valid(pfn) ((pfn) < num_physpages)
#endif /* CONFIG_DISCONTIGMEM */
+
+#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
+#define early_pfn_to_nid(pfn) pa_to_nid(((unsigned long)pfn) << PAGE_SHIFT)
+#endif
+
#endif /* _ASM_MMZONE_H_ */
--
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:"aart@kvack.org"> aart@kvack.org </a>
next reply other threads:[~2005-05-04 20:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-04 20:28 Andy Whitcroft [this message]
2005-05-05 15:44 ` Joel Schopp
2005-05-05 16:19 ` Andy Whitcroft
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=E1DTQUL-0002WE-D6@pinky.shadowen.org \
--to=apw@shadowen.org \
--cc=anton@samba.org \
--cc=haveblue@us.ibm.com \
--cc=kravetz@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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