ia64/linux-2.6.18-xen.hg

changeset 551:a741afb71700

balloon: Fix minimum_target() check to work when built as a module.
From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 15 09:42:27 2008 +0100 (2008-05-15)
parents d59a4aaf8615
children c3f9cc7789af
files drivers/xen/balloon/balloon.c
line diff
     1.1 --- a/drivers/xen/balloon/balloon.c	Wed May 14 13:53:06 2008 +0100
     1.2 +++ b/drivers/xen/balloon/balloon.c	Thu May 15 09:42:27 2008 +0100
     1.3 @@ -197,8 +197,8 @@ static unsigned long current_target(void
     1.4  static unsigned long minimum_target(void)
     1.5  {
     1.6  #ifndef CONFIG_XEN
     1.7 -	return 0;
     1.8 -#else
     1.9 +#define max_pfn num_physpages
    1.10 +#endif
    1.11  	unsigned long min_pages, curr_pages = current_target();
    1.12  
    1.13  #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT))
    1.14 @@ -226,6 +226,8 @@ static unsigned long minimum_target(void
    1.15  
    1.16  	/* Don't enforce growth */
    1.17  	return min(min_pages, curr_pages);
    1.18 +#ifndef CONFIG_XEN
    1.19 +#undef max_pfn
    1.20  #endif
    1.21  }
    1.22