debuggers.hg

changeset 21168:f12db0ad5f45

libxl: Fix the build by reinstating some sysctl.physinfo fields.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 08 16:11:17 2010 +0100 (2010-04-08)
parents c9e8369e49be
children 6c3db6c83a02
files xen/arch/x86/sysctl.c xen/include/public/sysctl.h
line diff
     1.1 --- a/xen/arch/x86/sysctl.c	Thu Apr 08 15:31:52 2010 +0100
     1.2 +++ b/xen/arch/x86/sysctl.c	Thu Apr 08 16:11:17 2010 +0100
     1.3 @@ -59,10 +59,13 @@ long arch_do_sysctl(
     1.4              cpus_weight(per_cpu(cpu_sibling_map, 0));
     1.5          pi->cores_per_socket =
     1.6              cpus_weight(per_cpu(cpu_core_map, 0)) / pi->threads_per_core;
     1.7 -        pi->nr_cpus = (u32)num_online_cpus();
     1.8 -        pi->nr_nodes = (u32)num_online_nodes();
     1.9 -        pi->sockets_per_node =  pi->nr_cpus / 
    1.10 -                     (pi->nr_nodes * pi->cores_per_socket * pi->threads_per_core);
    1.11 +        pi->nr_cpus = num_online_cpus();
    1.12 +        pi->nr_nodes = num_online_nodes();
    1.13 +        pi->max_node_id = last_node(node_online_map);
    1.14 +        pi->max_cpu_id = last_cpu(cpu_online_map);
    1.15 +        pi->sockets_per_node = 
    1.16 +            pi->nr_cpus / 
    1.17 +            (pi->nr_nodes * pi->cores_per_socket * pi->threads_per_core);
    1.18          pi->total_pages = total_pages;
    1.19          pi->free_pages = avail_domheap_pages();
    1.20          pi->scrub_pages = 0;
     2.1 --- a/xen/include/public/sysctl.h	Thu Apr 08 15:31:52 2010 +0100
     2.2 +++ b/xen/include/public/sysctl.h	Thu Apr 08 16:11:17 2010 +0100
     2.3 @@ -94,8 +94,8 @@ struct xen_sysctl_physinfo {
     2.4      uint32_t threads_per_core;
     2.5      uint32_t cores_per_socket;
     2.6      uint32_t sockets_per_node;
     2.7 -    uint32_t nr_cpus;
     2.8 -    uint32_t nr_nodes;
     2.9 +    uint32_t nr_cpus, max_cpu_id;
    2.10 +    uint32_t nr_nodes, max_node_id;
    2.11      uint32_t cpu_khz;
    2.12      uint64_aligned_t total_pages;
    2.13      uint64_aligned_t free_pages;