# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1166688432 -32400 # Node ID d8b84560af53a0eefe185a3f1b9b7c83fcff18a1 # Parent bddf36d06df6b8400f32875b772af3a410c03923 make balloon driver not return pages which are in [xen_start_info->nr_pages, max_pfn] on ia64. On ia64 memory might be assigned sparsely. In that case xen_start_info->nr_pages and max_pfn doesn't match while pages which are in [xen_start_info->nr_pages, max_pfn] are used. PATCHNAME: fix_balloon_init Signed-off-by: Isaku Yamahata diff -r bddf36d06df6 -r d8b84560af53 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Thu Dec 21 15:36:31 2006 +0900 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Thu Dec 21 17:07:12 2006 +0900 @@ -446,8 +446,10 @@ static struct notifier_block xenstore_no static int __init balloon_init(void) { +#ifndef __ia64__ unsigned long pfn; struct page *page; +#endif if (!is_running_on_xen()) return -ENODEV; @@ -477,12 +479,14 @@ static int __init balloon_init(void) #endif balloon_sysfs_init(); +#ifndef __ia64__ /* Initialise the balloon with excess memory space. */ for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) { page = pfn_to_page(pfn); if (!PageReserved(page)) balloon_append(page); } +#endif target_watch.callback = watch_target; xenstore_notifier.notifier_call = balloon_init_watcher;