ia64/xen-unstable

changeset 7220:8be702637183

Fix DOM0_PHYSINFO to return correct value for total
system memory.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 05 14:06:23 2005 +0100 (2005-10-05)
parents b4b12c9f1200
children e643fccb851b
files xen/arch/x86/dom0_ops.c xen/arch/x86/mm.c xen/arch/x86/setup.c xen/include/asm-x86/mm.h
line diff
     1.1 --- a/xen/arch/x86/dom0_ops.c	Wed Oct 05 13:54:36 2005 +0100
     1.2 +++ b/xen/arch/x86/dom0_ops.c	Wed Oct 05 14:06:23 2005 +0100
     1.3 @@ -186,7 +186,7 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
     1.4          pi->sockets_per_node = 
     1.5              num_online_cpus() / (pi->threads_per_core * pi->cores_per_socket);
     1.6          pi->nr_nodes         = 1;
     1.7 -        pi->total_pages      = max_page;
     1.8 +        pi->total_pages      = total_pages;
     1.9          pi->free_pages       = avail_domheap_pages();
    1.10          pi->cpu_khz          = cpu_khz;
    1.11          memset(pi->hw_cap, 0, sizeof(pi->hw_cap));
     2.1 --- a/xen/arch/x86/mm.c	Wed Oct 05 13:54:36 2005 +0100
     2.2 +++ b/xen/arch/x86/mm.c	Wed Oct 05 14:06:23 2005 +0100
     2.3 @@ -147,6 +147,7 @@ static struct domain *dom_xen, *dom_io;
     2.4  /* Frame table and its size in pages. */
     2.5  struct pfn_info *frame_table;
     2.6  unsigned long max_page;
     2.7 +unsigned long total_pages;
     2.8  
     2.9  void __init init_frametable(void)
    2.10  {
     3.1 --- a/xen/arch/x86/setup.c	Wed Oct 05 13:54:36 2005 +0100
     3.2 +++ b/xen/arch/x86/setup.c	Wed Oct 05 14:06:23 2005 +0100
     3.3 @@ -418,6 +418,7 @@ void __init __start_xen(multiboot_info_t
     3.4      printk("System RAM: %luMB (%lukB)\n", 
     3.5             nr_pages >> (20 - PAGE_SHIFT),
     3.6             nr_pages << (PAGE_SHIFT - 10));
     3.7 +    total_pages = nr_pages;
     3.8  
     3.9      init_frametable();
    3.10  
     4.1 --- a/xen/include/asm-x86/mm.h	Wed Oct 05 13:54:36 2005 +0100
     4.2 +++ b/xen/include/asm-x86/mm.h	Wed Oct 05 14:06:23 2005 +0100
     4.3 @@ -156,6 +156,7 @@ static inline u32 pickle_domptr(struct d
     4.4  
     4.5  extern struct pfn_info *frame_table;
     4.6  extern unsigned long max_page;
     4.7 +extern unsigned long total_pages;
     4.8  void init_frametable(void);
     4.9  
    4.10  int alloc_page_type(struct pfn_info *page, unsigned long type);