ia64/xen-unstable

changeset 9494:71e0c2ed4447

[IA64] Fixed DOM0_PHYSINFO

This patch fixed the DOM0_PHYSINFO hypercall.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Fri Apr 07 11:35:29 2006 -0600 (2006-04-07)
parents cc94ab1e0de0
children 8e0b9f31cf3f
files xen/arch/ia64/xen/dom0_ops.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom0_ops.c	Thu Apr 06 15:51:59 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom0_ops.c	Fri Apr 07 11:35:29 2006 -0600
     1.3 @@ -209,14 +209,16 @@ long arch_do_dom0_op(dom0_op_t *op, GUES
     1.4      {
     1.5          dom0_physinfo_t *pi = &op->u.physinfo;
     1.6  
     1.7 -        pi->threads_per_core = smp_num_siblings;
     1.8 -        pi->cores_per_socket = 1; // FIXME
     1.9 +        pi->threads_per_core =
    1.10 +            cpus_weight(cpu_sibling_map[0]);
    1.11 +        pi->cores_per_socket =
    1.12 +            cpus_weight(cpu_core_map[0]) / pi->threads_per_core;
    1.13          pi->sockets_per_node = 
    1.14 -            num_online_cpus() / (pi->threads_per_core * pi->cores_per_socket);
    1.15 +            num_online_cpus() / cpus_weight(cpu_core_map[0]);
    1.16          pi->nr_nodes         = 1;
    1.17          pi->total_pages      = 99;  // FIXME
    1.18          pi->free_pages       = avail_domheap_pages();
    1.19 -        pi->cpu_khz          = 100;  // FIXME cpu_khz;
    1.20 +        pi->cpu_khz          = local_cpu_data->proc_freq / 1000;
    1.21          memset(pi->hw_cap, 0, sizeof(pi->hw_cap));
    1.22          //memcpy(pi->hw_cap, boot_cpu_data.x86_capability, NCAPINTS*4);
    1.23          ret = 0;