[Patch:003/004]Unify pxm_to_node id ver.3.(for x86-64)
- From: Yasunori Goto <y-goto@xxxxxxxxxxxxxx>
- Date: Tue, 28 Mar 2006 19:17:14 +0900
This is to remove the code of pxm_to_node from x86-64 code.
Signed-off-by: Yasunori Goto <y-goto@xxxxxxxxxxxxxx>
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [Patch:000/004]Unify pxm_to_node id ver.3.
- From: Yasunori Goto
- [Patch:000/004]Unify pxm_to_node id ver.3.
- Prev by Date: [Patch:002/004]Unify pxm_to_node id ver.3. (for ia64)
- Next by Date: [Patch:001/004]Unify pxm_to_node id ver.3.(generic code)
- Previous by thread: [Patch:002/004]Unify pxm_to_node id ver.3. (for ia64)
- Next by thread: [Patch:001/004]Unify pxm_to_node id ver.3.(generic code)
- Index(es):
Relevant Pages
- [Patch:003/004] Unify pxm_to_node id ver.2. (for x86_64)
... static __init int setup_node(int pxm) ... static __init int conflicting_nodes
... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - [PATCH/RFC] Unify mapping from PXM to node id.
... This patch is to unify mapping from pxm to node id as a common code.
... +int node_to_pxm ... (Linux-Kernel) - Re: [PATCH] acpi: Fix potential call to a freed memory section.
... This will cause an oops by calling into a freed memory section. ... +int
pxm_to_node(int pxm) ... +int node_to_pxm ... (Linux-Kernel) - [patch 36/54] acpi: fix potential call to a freed memory section.
... This fixes a bug triggered by the following conditions: ... - boot on
a machine with a SLIT table defined ... +int pxm_to_node(int pxm) ... +int
node_to_pxm ... (Linux-Kernel) - [RFT/PATCH]Unify mapping from pxm to node id (take 2).
... test of this patch hasn't completed. ... This patch is to unify mapping
from pxm to node id. ... static __init int conflicting_nodes ... (Linux-Kernel)