ACPI: NUMA: map pxms to low node ids

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, April 8, 2010 - 8:59 am

Gitweb:     http://git.kernel.org/linus/0f9b75ef3722814134f307f51c19e0791da40e69
Commit:     0f9b75ef3722814134f307f51c19e0791da40e69
Parent:     2eaa9cfdf33b8d7fb7aff27792192e0019ae8fc6
Author:     David Rientjes <rientjes@google.com>
AuthorDate: Thu Mar 25 16:33:04 2010 -0700
Committer:  Len Brown <len.brown@intel.com>
CommitDate: Sun Apr 4 00:50:01 2010 -0400

    ACPI: NUMA: map pxms to low node ids
    
    pxms are mapped to low node ids to maintain generic kernel use of
    functions such as pxm_to_node() that are used to determine device
    affinity.  Otherwise, there is no pxm-to-node and node-to-pxm matching
    rule for x86_64 users of NUMA emulation where a single pxm may be bound
    to multiple NUMA nodes.
    
    Signed-off-by: David Rientjes <rientjes@google.com>
    Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/numa.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index b872546..b0337d3 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -61,8 +61,10 @@ int node_to_pxm(int node)
 
 void __acpi_map_pxm_to_node(int pxm, int node)
 {
-	pxm_to_node_map[pxm] = node;
-	node_to_pxm_map[node] = pxm;
+	if (pxm_to_node_map[pxm] == NUMA_NO_NODE || node < pxm_to_node_map[pxm])
+		pxm_to_node_map[pxm] = node;
+	if (node_to_pxm_map[node] == PXM_INVAL || pxm < node_to_pxm_map[node])
+		node_to_pxm_map[node] = pxm;
 }
 
 int acpi_map_pxm_to_node(int pxm)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ACPI: NUMA: map pxms to low node ids, Linux Kernel Mailing ..., (Thu Apr 8, 8:59 am)