From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: Andrew Morton <akpm@osdl.org>
Cc: "Luck, Tony" <tony.luck@intel.com>, Andi Kleen <ak@suse.de>,
"Brown, Len" <len.brown@intel.com>,
Linux Kernel ML <linux-kernel@vger.kernel.org>,
ACPI-ML <linux-acpi@vger.kernel.org>,
linux-ia64@vger.kernel.org, x86-64 Discuss <discuss@x86-64.org>
Subject: [Patch:003/004]Unify pxm_to_node id ver.3.(for x86-64)
Date: Tue, 28 Mar 2006 10:17:14 +0000 [thread overview]
Message-ID: <20060328191359.CC4C.Y-GOTO@jp.fujitsu.com> (raw)
In-Reply-To: <20060328183058.CC46.Y-GOTO@jp.fujitsu.com>
This is to remove the code of pxm_to_node from x86-64 code.
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
arch/x86_64/mm/srat.c | 33 +--------------------------------
include/asm-x86_64/numa.h | 1 -
2 files changed, 1 insertion(+), 33 deletions(-)
Index: pxm_ver3/arch/x86_64/mm/srat.c
=================================--- pxm_ver3.orig/arch/x86_64/mm/srat.c 2006-03-27 12:09:14.000000000 +0900
+++ pxm_ver3/arch/x86_64/mm/srat.c 2006-03-27 14:07:14.000000000 +0900
@@ -22,35 +22,15 @@
static struct acpi_table_slit *acpi_slit;
static nodemask_t nodes_parsed __initdata;
-static nodemask_t nodes_found __initdata;
static struct bootnode nodes[MAX_NUMNODES] __initdata;
-static u8 pxm2node[256] = { [0 ... 255] = 0xff };
/* Too small nodes confuse the VM badly. Usually they result
from BIOS bugs. */
#define NODE_MIN_SIZE (4*1024*1024)
-static int node_to_pxm(int n);
-
-int pxm_to_node(int pxm)
-{
- if ((unsigned)pxm >= 256)
- return -1;
- /* Extend 0xff to (int)-1 */
- return (signed char)pxm2node[pxm];
-}
-
static __init int setup_node(int pxm)
{
- unsigned node = pxm2node[pxm];
- if (node = 0xff) {
- if (nodes_weight(nodes_found) >= MAX_NUMNODES)
- return -1;
- node = first_unset_node(nodes_found);
- node_set(node, nodes_found);
- pxm2node[pxm] = node;
- }
- return pxm2node[pxm];
+ return acpi_map_pxm_to_node(pxm);
}
static __init int conflicting_nodes(unsigned long start, unsigned long end)
@@ -292,17 +272,6 @@ int __init acpi_scan_nodes(unsigned long
return 0;
}
-static int node_to_pxm(int n)
-{
- int i;
- if (pxm2node[n] = n)
- return n;
- for (i = 0; i < 256; i++)
- if (pxm2node[i] = n)
- return i;
- return 0;
-}
-
int __node_distance(int a, int b)
{
int index;
Index: pxm_ver3/include/asm-x86_64/numa.h
=================================--- pxm_ver3.orig/include/asm-x86_64/numa.h 2006-03-27 12:09:17.000000000 +0900
+++ pxm_ver3/include/asm-x86_64/numa.h 2006-03-27 14:05:12.000000000 +0900
@@ -9,7 +9,6 @@ struct bootnode {
};
extern int compute_hash_shift(struct bootnode *nodes, int numnodes);
-extern int pxm_to_node(int nid);
#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
--
Yasunori Goto
next prev parent reply other threads:[~2006-03-28 10:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-28 10:12 [Patch:000/004]Unify pxm_to_node id ver.3 Yasunori Goto
2006-03-28 10:16 ` [Patch:001/004]Unify pxm_to_node id ver.3.(generic code) Yasunori Goto
2006-03-28 21:07 ` Andrew Morton
2006-03-29 1:28 ` Yasunori Goto
2006-03-28 10:17 ` [Patch:002/004]Unify pxm_to_node id ver.3. (for ia64) Yasunori Goto
2006-03-28 10:17 ` Yasunori Goto [this message]
2006-03-28 10:17 ` [Patch:004/004]Unify pxm_to_node id ver.3. (for i386) Yasunori Goto
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=20060328191359.CC4C.Y-GOTO@jp.fujitsu.com \
--to=y-goto@jp.fujitsu.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=discuss@x86-64.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.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