* [Patch:003/004] Unify pxm_to_node id ver.2. (for x86_64)
@ 2006-02-01 12:36 ` Yasunori Goto
0 siblings, 0 replies; 2+ messages in thread
From: Yasunori Goto @ 2006-02-01 12:36 UTC (permalink / raw)
To: Andrew Morton
Cc: Andi Kleen, Luck, Tony, Brown, Len, Bob Picco, Paul Jackson,
Andy Whitcroft, Linux Kernel ML, ACPI-ML, linux-ia64,
x86-64 Discuss
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_ver2/arch/x86_64/mm/srat.c
===================================================================
--- pxm_ver2.orig/arch/x86_64/mm/srat.c 2006-02-01 18:53:45.000000000 +0900
+++ pxm_ver2/arch/x86_64/mm/srat.c 2006-02-01 18:54:25.000000000 +0900
@@ -22,31 +22,11 @@
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 };
-
-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)
@@ -302,17 +282,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_ver2/include/asm-x86_64/numa.h
===================================================================
--- pxm_ver2.orig/include/asm-x86_64/numa.h 2006-02-01 18:53:45.000000000 +0900
+++ pxm_ver2/include/asm-x86_64/numa.h 2006-02-01 18:54:25.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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Patch:003/004] Unify pxm_to_node id ver.2. (for x86_64)
@ 2006-02-01 12:36 ` Yasunori Goto
0 siblings, 0 replies; 2+ messages in thread
From: Yasunori Goto @ 2006-02-01 12:36 UTC (permalink / raw)
To: Andrew Morton
Cc: Andi Kleen, Luck, Tony, Brown, Len, Bob Picco, Paul Jackson,
Andy Whitcroft, Linux Kernel ML, ACPI-ML, linux-ia64,
x86-64 Discuss
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_ver2/arch/x86_64/mm/srat.c
=================================--- pxm_ver2.orig/arch/x86_64/mm/srat.c 2006-02-01 18:53:45.000000000 +0900
+++ pxm_ver2/arch/x86_64/mm/srat.c 2006-02-01 18:54:25.000000000 +0900
@@ -22,31 +22,11 @@
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 };
-
-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)
@@ -302,17 +282,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_ver2/include/asm-x86_64/numa.h
=================================--- pxm_ver2.orig/include/asm-x86_64/numa.h 2006-02-01 18:53:45.000000000 +0900
+++ pxm_ver2/include/asm-x86_64/numa.h 2006-02-01 18:54:25.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-01 12:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-01 12:36 [Patch:003/004] Unify pxm_to_node id ver.2. (for x86_64) Yasunori Goto
2006-02-01 12:36 ` Yasunori Goto
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.