direct-io.hg

changeset 6461:936be0ae823f

Fix page_is_ram() start-of-day checks, and the watch routine
inside balloon driver.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Aug 29 14:53:38 2005 +0000 (2005-08-29)
parents 3b3532384aab
children b88e1417bd14
files linux-2.6-xen-sparse/arch/xen/i386/mm/init.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Mon Aug 29 13:58:46 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/init.c	Mon Aug 29 14:53:38 2005 +0000
     1.3 @@ -219,6 +219,8 @@ static void __init kernel_physical_mappi
     1.4  	}
     1.5  }
     1.6  
     1.7 +#ifndef CONFIG_XEN
     1.8 +
     1.9  static inline int page_kills_ppro(unsigned long pagenr)
    1.10  {
    1.11  	if (pagenr >= 0x70000 && pagenr <= 0x7003F)
    1.12 @@ -266,6 +268,13 @@ static inline int page_is_ram(unsigned l
    1.13  	return 0;
    1.14  }
    1.15  
    1.16 +#else /* CONFIG_XEN */
    1.17 +
    1.18 +#define page_kills_ppro(p)	0
    1.19 +#define page_is_ram(p)		1
    1.20 +
    1.21 +#endif
    1.22 +
    1.23  #ifdef CONFIG_HIGHMEM
    1.24  pte_t *kmap_pte;
    1.25  pgprot_t kmap_prot;
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Mon Aug 29 13:58:46 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c	Mon Aug 29 14:53:38 2005 +0000
     2.3 @@ -767,9 +767,6 @@ void __init clear_kernel_mapping(unsigne
     2.4  
     2.5  static inline int page_is_ram (unsigned long pagenr)
     2.6  {
     2.7 -        if (pagenr < start_pfn || pagenr >= end_pfn)
     2.8 -                return 0;
     2.9 -
    2.10          return 1;
    2.11  }
    2.12  
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Mon Aug 29 13:58:46 2005 +0000
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Mon Aug 29 14:53:38 2005 +0000
     3.3 @@ -295,10 +295,10 @@ static struct xenbus_watch target_watch 
     3.4  /* React to a change in the target key */
     3.5  static void watch_target(struct xenbus_watch *watch, const char *node)
     3.6  {
     3.7 -	unsigned long new_target;
     3.8 +	unsigned long long new_target;
     3.9  	int err;
    3.10  
    3.11 -	err = xenbus_scanf("memory", "target", "%lu", &new_target);
    3.12 +	err = xenbus_scanf("memory", "target", "%llu", &new_target);
    3.13  	if (err != 1) {
    3.14  		printk(KERN_ERR "Unable to read memory/target\n");
    3.15  		return;