aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/balloon.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2011-09-28 12:46:33 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-09-29 11:12:09 -0400
commitb1cbf9b1d6af22ba262d99abcfd71d5d90dbd57a (patch)
treeff8a5c8d68451f5ef23bc427351e061ef42ae7a4 /drivers/xen/balloon.c
parentaa24411b6717fd1e6ecef281bec497f6f30bbd66 (diff)
xen/balloon: simplify test for the end of usable RAM
When initializing the balloon only max_pfn needs to be checked (max_pfn will always be <= e820_end_of_ram_pfn()) and improve the confusing comment. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r--drivers/xen/balloon.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 4f59fb373381..9efb993090aa 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -586,16 +586,16 @@ static int __init balloon_init(void)
586#endif 586#endif
587 587
588 /* 588 /*
589 * Initialise the balloon with excess memory space. We need 589 * Initialize the balloon with pages from the extra memory
590 * to make sure we don't add memory which doesn't exist or 590 * region (see arch/x86/xen/setup.c).
591 * logically exist. The E820 map can be trimmed to be smaller 591 *
592 * than the amount of physical memory due to the mem= command 592 * If the amount of usable memory has been limited (e.g., with
593 * line parameter. And if this is a 32-bit non-HIGHMEM kernel 593 * the 'mem' command line parameter), don't add pages beyond
594 * on a system with memory which requires highmem to access, 594 * this limit.
595 * don't try to use it.
596 */ 595 */
597 extra_pfn_end = min(min(max_pfn, e820_end_of_ram_pfn()), 596 extra_pfn_end = min(max_pfn,
598 (unsigned long)PFN_DOWN(xen_extra_mem_start + xen_extra_mem_size)); 597 (unsigned long)PFN_DOWN(xen_extra_mem_start
598 + xen_extra_mem_size));
599 for (pfn = PFN_UP(xen_extra_mem_start); 599 for (pfn = PFN_UP(xen_extra_mem_start);
600 pfn < extra_pfn_end; 600 pfn < extra_pfn_end;
601 pfn++) { 601 pfn++) {