WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] Provide pxm_to_node and node_to_px

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Provide pxm_to_node and node_to_pxm translation functions
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 16 Jun 2007 05:53:01 -0700
Delivery-date: Sat, 16 Jun 2007 05:51:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1181683322 21600
# Node ID f5d22922444db066d1cd269638ddb04f6604e4fd
# Parent  855fe0bf6590bf8dc4c1080bf22adcd04a8fbe2e
[IA64] Provide pxm_to_node and node_to_pxm translation functions

Required for NUMA node table setup on sn2.

Signed-off-by: Jes Sorensen <jes@xxxxxxx>
---
 xen/arch/ia64/linux-xen/sn/kernel/setup.c |    5 -----
 xen/arch/ia64/xen/acpi.c                  |   22 ++++++++++++++++++++--
 xen/include/asm-ia64/linux-xen/asm/numa.h |    2 ++
 3 files changed, 22 insertions(+), 7 deletions(-)

diff -r 855fe0bf6590 -r f5d22922444d xen/arch/ia64/linux-xen/sn/kernel/setup.c
--- a/xen/arch/ia64/linux-xen/sn/kernel/setup.c Tue Jun 12 15:20:06 2007 -0600
+++ b/xen/arch/ia64/linux-xen/sn/kernel/setup.c Tue Jun 12 15:22:02 2007 -0600
@@ -72,11 +72,6 @@
 #include <asm/sn/klconfig.h>
 #ifdef XEN
 #include <asm/sn/shubio.h>
-
-/* Xen has no clue about NUMA ....  grrrr */
-#define pxm_to_node(foo)               0
-#define node_to_pxm(foo)               0
-#define numa_node_id()                 0
 #endif
 
 
diff -r 855fe0bf6590 -r f5d22922444d xen/arch/ia64/xen/acpi.c
--- a/xen/arch/ia64/xen/acpi.c  Tue Jun 12 15:20:06 2007 -0600
+++ b/xen/arch/ia64/xen/acpi.c  Tue Jun 12 15:22:02 2007 -0600
@@ -388,6 +388,24 @@ int __initdata nid_to_pxm_map[MAX_NUMNOD
 int __initdata nid_to_pxm_map[MAX_NUMNODES];
 static struct acpi_table_slit __initdata *slit_table;
 
+#define NID_INVAL                      -1
+#define PXM_INVAL                      -1
+
+int __init pxm_to_node(int pxm)
+{
+       if (pxm < 0)
+               return NID_INVAL;
+       return pxm_to_nid_map[pxm];
+}
+
+int __init node_to_pxm(int node)
+{
+       if (node < 0)
+               return PXM_INVAL;
+       return nid_to_pxm_map[node];
+}
+
+
 /*
  * ACPI 2.0 SLIT (System Locality Information Table)
  * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf
@@ -473,8 +491,8 @@ acpi_numa_arch_fixup (void)
        /* calculate total number of nodes in system from PXM bitmap */
        numnodes = 0;           /* init total nodes in system */
 
-       memset(pxm_to_nid_map, -1, sizeof(pxm_to_nid_map));
-       memset(nid_to_pxm_map, -1, sizeof(nid_to_pxm_map));
+       memset(pxm_to_nid_map, PXM_INVAL, sizeof(pxm_to_nid_map));
+       memset(nid_to_pxm_map, NID_INVAL, sizeof(nid_to_pxm_map));
        for (i = 0; i < MAX_PXM_DOMAINS; i++) {
                if (pxm_bit_test(i)) {
                        pxm_to_nid_map[i] = numnodes;
diff -r 855fe0bf6590 -r f5d22922444d xen/include/asm-ia64/linux-xen/asm/numa.h
--- a/xen/include/asm-ia64/linux-xen/asm/numa.h Tue Jun 12 15:20:06 2007 -0600
+++ b/xen/include/asm-ia64/linux-xen/asm/numa.h Tue Jun 12 15:22:02 2007 -0600
@@ -75,6 +75,8 @@ extern int paddr_to_nid(unsigned long pa
 
 #ifdef XEN
 #define phys_to_nid(paddr) paddr_to_nid(paddr)
+extern int pxm_to_node(int pxm);
+extern int node_to_pxm(int node);
 #endif
 
 #endif /* _ASM_IA64_NUMA_H */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Provide pxm_to_node and node_to_pxm translation functions, Xen patchbot-unstable <=