Fix page_is_ram() start-of-day checks, and the watch routine
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 29 Aug 2005 14:53:38 +0000 (14:53 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 29 Aug 2005 14:53:38 +0000 (14:53 +0000)
inside balloon driver.

Signed-off-by: Keir Fraser <keir@xensource.com>
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

index 645eaa34d627c0da0bd14a5d2c60f07c58f28ea9..ba3c9a6b274631d0cae0dbb1a4b75ed3c16434ed 100644 (file)
@@ -219,6 +219,8 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
        }
 }
 
+#ifndef CONFIG_XEN
+
 static inline int page_kills_ppro(unsigned long pagenr)
 {
        if (pagenr >= 0x70000 && pagenr <= 0x7003F)
@@ -266,6 +268,13 @@ static inline int page_is_ram(unsigned long pagenr)
        return 0;
 }
 
+#else /* CONFIG_XEN */
+
+#define page_kills_ppro(p)     0
+#define page_is_ram(p)         1
+
+#endif
+
 #ifdef CONFIG_HIGHMEM
 pte_t *kmap_pte;
 pgprot_t kmap_prot;
index f9f74540361ec80a39f906ad132b0d4ae78242fc..22ad3dfd7d5044d3d4caa62a609ff503874ca4a6 100644 (file)
@@ -767,9 +767,6 @@ void __init clear_kernel_mapping(unsigned long address, unsigned long size)
 
 static inline int page_is_ram (unsigned long pagenr)
 {
-        if (pagenr < start_pfn || pagenr >= end_pfn)
-                return 0;
-
         return 1;
 }
 
index 5498e5a80409fc666ff55e61f2e47ad88bc27e89..dd052e42a0eab1ba9ea6d4a23b967a399be2c2d9 100644 (file)
@@ -295,10 +295,10 @@ static struct xenbus_watch target_watch =
 /* React to a change in the target key */
 static void watch_target(struct xenbus_watch *watch, const char *node)
 {
-       unsigned long new_target;
+       unsigned long long new_target;
        int err;
 
-       err = xenbus_scanf("memory", "target", "%lu", &new_target);
+       err = xenbus_scanf("memory", "target", "%llu", &new_target);
        if (err != 1) {
                printk(KERN_ERR "Unable to read memory/target\n");
                return;