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-ppc-devel

[XenPPC] [linux-ppc-2.6] [XEN][POWERPC] Fixes int he bitmap managment of

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [XEN][POWERPC] Fixes int he bitmap managment of the Foriegn Map
From: Xen patchbot-linux-ppc-2.6 <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 11 Nov 2006 00:02:24 +0000
Delivery-date: Fri, 10 Nov 2006 16:07:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID ef51ca28a1fc1e49299f0492194f921a309abc64
# Parent  7553b5170236ffe6ed3805c321bfd1ce2010793e
[XEN][POWERPC] Fixes int he bitmap managment of the Foriegn Map

Bitmap bit position are ulongs, and more error checking.
Thanks to: muli@xxxxxxxxxx

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 arch/powerpc/platforms/xen/balloon.c |    1 +
 arch/powerpc/platforms/xen/gnttab.c  |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff -r 7553b5170236 -r ef51ca28a1fc arch/powerpc/platforms/xen/balloon.c
--- a/arch/powerpc/platforms/xen/balloon.c      Fri Nov 10 18:47:12 2006 -0500
+++ b/arch/powerpc/platforms/xen/balloon.c      Fri Nov 10 18:49:48 2006 -0500
@@ -18,6 +18,7 @@ struct page **alloc_empty_pages_and_page
 
        for (i = 0; i < nr_pages; i++) {
                page = alloc_foreign_page();
+               BUG_ON(page == NULL);
                pagevec[i] = page;
                /* There is no real page backing us yet so it cannot
                 * be scrubbed */
diff -r 7553b5170236 -r ef51ca28a1fc arch/powerpc/platforms/xen/gnttab.c
--- a/arch/powerpc/platforms/xen/gnttab.c       Fri Nov 10 18:47:12 2006 -0500
+++ b/arch/powerpc/platforms/xen/gnttab.c       Fri Nov 10 18:49:48 2006 -0500
@@ -355,7 +355,7 @@ int arch_gnttab_suspend(volatile void __
 
 struct page *alloc_foreign_page(void)
 {
-       int bit;
+       ulong bit;
        do {
                bit = find_first_zero_bit(foreign_map_bitmap,
                                          foreign_map_pgs);
@@ -368,10 +368,10 @@ struct page *alloc_foreign_page(void)
 
 void free_foreign_page(struct page *page)
 {
-       int bit = page_to_pfn(page) - foreign_map_pfn;
-
-       BUG_ON(bit < 0);
+       ulong bit = page_to_pfn(page) - foreign_map_pfn;
+
        BUG_ON(bit >= foreign_map_pgs);
+       BUG_ON(!test_bit(bit, foreign_map_bitmap));
 
        clear_bit(bit, foreign_map_bitmap);
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [linux-ppc-2.6] [XEN][POWERPC] Fixes int he bitmap managment of the Foriegn Map, Xen patchbot-linux-ppc-2 . 6 <=