WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Arch-neutral balloon driver

To: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
Subject: Re: [Xen-devel] [PATCH] Arch-neutral balloon driver
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Wed, 7 Dec 2005 15:13:51 -0600
Cc: Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 07 Dec 2005 21:14:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <516F50407E01324991DD6D07B0531AD5876265@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <516F50407E01324991DD6D07B0531AD5876265@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Dec 6, 2005, at 6:16 PM, Magenheimer, Dan (HP Labs Fort Collins) wrote:

Attached patch makes the balloon driver arch-neutral
(compiles on ia64... look ma, no #ifdef's!).  Please apply
to xen-unstable.

diff -r 0255f48b757f linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Sun Dec 4 19:12:00 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Tue Dec 6 16:25:53 2005
@@ -444,6 +444,9 @@

        IPRINTK("Initialising balloon driver.\n");

+       if (xen_init() < 0)
+               return -1;
+
        current_pages = min(xen_start_info->nr_pages, max_pfn);
        target_pages  = current_pages;
        balloon_low   = 0;

I had some suggestions to obviate this "xen_init()" stuff; you can read them again at http://lists.xensource.com/archives/html/xen-devel/2005-09/ msg00881.html . I see that xen_init() was introduced anyways, but I would not like to see it spread. Instead let's correct the problem it's working around.

diff -r 0255f48b757f linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h
Sun Dec  4 19:12:00 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h
Tue Dec  6 16:25:53 2005
@@ -52,4 +52,19 @@
 #define        mfn_to_pfn(x)   (x)
 #define machine_to_phys_mapping 0

+// for drivers/xen/balloon/balloon.c

C++ comment

Other than that this looks ok to me. I think your mailer line-wrapped the patch though.

--
Hollis Blanchard
IBM Linux Technology Center


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>