|
|
|
|
|
|
|
|
|
|
xen-ppc-devel
[XenPPC] [linux-ppc-2.6] [XEN][POWERPC] Fixes int he bitmap managment of
# 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 <=
|
|
|
|
|