ia64/xen-unstable

changeset 9773:9a915e2828f3

[IA64] Fix the total memory info with xm info command

This small patch intends to provide correct total memory info for
control panel and fixed hardcode for that. The total memory info doesn't
include the memory FW used.

Signed-off-by : Zhang Xiantao <xiantao.zhang@intel.com>
author awilliam@xenbuild.aw
date Tue Apr 25 22:55:22 2006 -0600 (2006-04-25)
parents ddcd9c267612
children ae709b250f43
files xen/arch/ia64/xen/dom0_ops.c xen/arch/ia64/xen/xensetup.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom0_ops.c	Tue Apr 25 22:52:49 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom0_ops.c	Tue Apr 25 22:55:22 2006 -0600
     1.3 @@ -19,7 +19,7 @@
     1.4  #include <xen/guest_access.h>
     1.5  #include <public/sched_ctl.h>
     1.6  #include <asm/vmx.h>
     1.7 -
     1.8 +extern unsigned long total_pages;
     1.9  long arch_do_dom0_op(dom0_op_t *op, GUEST_HANDLE(dom0_op_t) u_dom0_op)
    1.10  {
    1.11      long ret = 0;
    1.12 @@ -216,7 +216,7 @@ long arch_do_dom0_op(dom0_op_t *op, GUES
    1.13          pi->sockets_per_node = 
    1.14              num_online_cpus() / cpus_weight(cpu_core_map[0]);
    1.15          pi->nr_nodes         = 1;
    1.16 -        pi->total_pages      = 99;  // FIXME
    1.17 +        pi->total_pages      = total_pages; 
    1.18          pi->free_pages       = avail_domheap_pages();
    1.19          pi->cpu_khz          = local_cpu_data->proc_freq / 1000;
    1.20          memset(pi->hw_cap, 0, sizeof(pi->hw_cap));
     2.1 --- a/xen/arch/ia64/xen/xensetup.c	Tue Apr 25 22:52:49 2006 -0600
     2.2 +++ b/xen/arch/ia64/xen/xensetup.c	Tue Apr 25 22:55:22 2006 -0600
     2.3 @@ -30,7 +30,7 @@
     2.4   #error "struct shared_info does not not fit in PAGE_SIZE"
     2.5  #endif
     2.6  
     2.7 -unsigned long xenheap_phys_end;
     2.8 +unsigned long xenheap_phys_end, total_pages;
     2.9  
    2.10  char saved_command_line[COMMAND_LINE_SIZE];
    2.11  char dom0_command_line[COMMAND_LINE_SIZE];
    2.12 @@ -317,6 +317,7 @@ void start_kernel(void)
    2.13      printk("System RAM: %luMB (%lukB)\n",
    2.14  	nr_pages >> (20 - PAGE_SHIFT),
    2.15  	nr_pages << (PAGE_SHIFT - 10));
    2.16 +    total_pages = nr_pages;
    2.17  
    2.18      init_frametable();
    2.19