Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: fix NUMA code for 32bit

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: fix NUMA code for 32bit
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Sep 2007 03:40:21 -0700
Delivery-date: Wed, 26 Sep 2007 04:28:42 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1189782608 -3600
# Node ID b3f681d712659582112c33b36bd31dab6f1a96b8
# Parent  0349e4eedd25a301b0f104bcaef8665c62a99bcd
x86: fix NUMA code for 32bit

I don't know how significant this is (most of the NUMA node data seems
unused at this point), but anyway: enable proper operation of NUMA
emulation and the fake NUMA node in case there's no SRAT table on
x86-32. This will at least make the "Faking node ..." message not
print confusing information anymore.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/numa.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff -r 0349e4eedd25 -r b3f681d71265 xen/arch/x86/numa.c
--- a/xen/arch/x86/numa.c       Fri Sep 14 16:08:39 2007 +0100
+++ b/xen/arch/x86/numa.c       Fri Sep 14 16:10:08 2007 +0100
@@ -139,15 +139,15 @@ static int numa_fake __initdata = 0;
 static int numa_fake __initdata = 0;
 
 /* Numa emulation */
-static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
+static int numa_emulation(u64 start_pfn, u64 end_pfn)
 {
        int i;
        struct node nodes[MAX_NUMNODES];
-       unsigned long sz = ((end_pfn - start_pfn)<<PAGE_SHIFT) / numa_fake;
+       u64 sz = ((end_pfn - start_pfn)<<PAGE_SHIFT) / numa_fake;
 
        /* Kludge needed for the hash function */
        if (hweight64(sz) > 1) {
-               unsigned long x = 1;
+               u64 x = 1;
                while ((x << 1) < sz)
                        x <<= 1;
                if (x < sz/2)
@@ -190,17 +190,17 @@ void __init numa_initmem_init(unsigned l
 #endif
 
 #ifdef CONFIG_ACPI_NUMA
-       if (!numa_off && !acpi_scan_nodes(start_pfn << PAGE_SHIFT,
-                                         end_pfn << PAGE_SHIFT))
+       if (!numa_off && !acpi_scan_nodes((u64)start_pfn << PAGE_SHIFT,
+                                         (u64)end_pfn << PAGE_SHIFT))
                return;
 #endif
 
        printk(KERN_INFO "%s\n",
               numa_off ? "NUMA turned off" : "No NUMA configuration found");
 
-       printk(KERN_INFO "Faking a node at %016lx-%016lx\n", 
-              start_pfn << PAGE_SHIFT,
-              end_pfn << PAGE_SHIFT); 
+       printk(KERN_INFO "Faking a node at %016"PRIx64"-%016"PRIx64"\n",
+              (u64)start_pfn << PAGE_SHIFT,
+              (u64)end_pfn << PAGE_SHIFT);
        /* setup dummy node covering all memory */ 
        memnode_shift = 63; 
        memnodemap[0] = 0;
@@ -209,7 +209,7 @@ void __init numa_initmem_init(unsigned l
        for (i = 0; i < NR_CPUS; i++)
                numa_set_node(i, 0);
        node_to_cpumask[0] = cpumask_of_cpu(0);
-       setup_node_bootmem(0, start_pfn << PAGE_SHIFT, end_pfn << PAGE_SHIFT);
+       setup_node_bootmem(0, (u64)start_pfn << PAGE_SHIFT, (u64)end_pfn << 
PAGE_SHIFT);
 }
 
 __cpuinit void numa_add_cpu(int cpu)

_______________________________________________
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] x86: fix NUMA code for 32bit, Xen patchbot-unstable <=