[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl: Fix the build by reinstating some sysctl.physinfo fields.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1270739477 -3600
# Node ID f12db0ad5f450c7c51d736f5db8ffbf5dbfb8c25
# Parent  c9e8369e49be7396eca444cfce27e6782e4aa248
libxl: Fix the build by reinstating some sysctl.physinfo fields.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/sysctl.c       |   11 +++++++----
 xen/include/public/sysctl.h |    4 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)

diff -r c9e8369e49be -r f12db0ad5f45 xen/arch/x86/sysctl.c
--- a/xen/arch/x86/sysctl.c     Thu Apr 08 15:31:52 2010 +0100
+++ b/xen/arch/x86/sysctl.c     Thu Apr 08 16:11:17 2010 +0100
@@ -59,10 +59,13 @@ long arch_do_sysctl(
             cpus_weight(per_cpu(cpu_sibling_map, 0));
         pi->cores_per_socket =
             cpus_weight(per_cpu(cpu_core_map, 0)) / pi->threads_per_core;
-        pi->nr_cpus = (u32)num_online_cpus();
-        pi->nr_nodes = (u32)num_online_nodes();
-        pi->sockets_per_node =  pi->nr_cpus / 
-                     (pi->nr_nodes * pi->cores_per_socket * 
pi->threads_per_core);
+        pi->nr_cpus = num_online_cpus();
+        pi->nr_nodes = num_online_nodes();
+        pi->max_node_id = last_node(node_online_map);
+        pi->max_cpu_id = last_cpu(cpu_online_map);
+        pi->sockets_per_node = 
+            pi->nr_cpus / 
+            (pi->nr_nodes * pi->cores_per_socket * pi->threads_per_core);
         pi->total_pages = total_pages;
         pi->free_pages = avail_domheap_pages();
         pi->scrub_pages = 0;
diff -r c9e8369e49be -r f12db0ad5f45 xen/include/public/sysctl.h
--- a/xen/include/public/sysctl.h       Thu Apr 08 15:31:52 2010 +0100
+++ b/xen/include/public/sysctl.h       Thu Apr 08 16:11:17 2010 +0100
@@ -94,8 +94,8 @@ struct xen_sysctl_physinfo {
     uint32_t threads_per_core;
     uint32_t cores_per_socket;
     uint32_t sockets_per_node;
-    uint32_t nr_cpus;
-    uint32_t nr_nodes;
+    uint32_t nr_cpus, max_cpu_id;
+    uint32_t nr_nodes, max_node_id;
     uint32_t cpu_khz;
     uint64_aligned_t total_pages;
     uint64_aligned_t free_pages;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.