From: kaf24@firebug.cl.cam.ac.uk Date: Fri, 28 Apr 2006 07:30:52 +0000 (+0100) Subject: Relax BUG_ON() state ment in increase_reservation() in balloon.c. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16108^2~64 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=37f486b06e304f438b875bca611ed88ec44c6b4f;p=xen.git Relax BUG_ON() state ment in increase_reservation() in balloon.c. When xen_feature(XENFEAT_auto_translated_physmap) = 1, phys_to_machine_mapping_valid(pfn) always returns true. Relaxed BUG_ON() for xen_feature(XENFEAT_auto_translated_physmap) = 1 case. Signed-off-by: Isaku Yamahata --- diff --git a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c index 46f587f6c0..925de702f6 100644 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c @@ -216,7 +216,8 @@ static int increase_reservation(unsigned long nr_pages) BUG_ON(page == NULL); pfn = page_to_pfn(page); - BUG_ON(phys_to_machine_mapping_valid(pfn)); + BUG_ON(!xen_feature(XENFEAT_auto_translated_physmap) && + phys_to_machine_mapping_valid(pfn)); /* Update P->M and M->P tables. */ set_phys_to_machine(pfn, frame_list[i]);