| @@ -581,7 +581,6 @@ void balloon_set_new_target(unsigned long target) · 580 unmodified lines |
| 581 | 581 | } |
| 582 | 582 | EXPORT_SYMBOL_GPL(balloon_set_new_target); |
| 583 | 583 | |
| 584 | | −#ifndef CONFIG_XEN_UNPOPULATED_ALLOC |
| 585 | 584 | static int add_ballooned_pages(unsigned int nr_pages) |
| 586 | 585 | { |
| 587 | 586 | enum bp_state st; |
| @@ -610,12 +609,12 @@ static int add_ballooned_pages(unsigned int nr_pages) · 22 unmodified lines |
| 610 | 609 | } |
| 611 | 610 | |
| 612 | 611 | /** |
| 613 | | − * xen_alloc_unpopulated_pages - get pages that have been ballooned out |
| 612 | + * xen_alloc_ballooned_pages - get pages that have been ballooned out |
| 614 | 613 | * @nr_pages: Number of pages to get |
| 615 | 614 | * @pages: pages returned |
| 616 | 615 | * @return 0 on success, error otherwise |
| 617 | 616 | */ |
| 618 | | −int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages) |
| 617 | +int xen_alloc_ballooned_pages(unsigned int nr_pages, struct page **pages) |
| 619 | 618 | { |
| 620 | 619 | unsigned int pgno = 0; |
| 621 | 620 | struct page *page; |
| @@ -652,23 +651,23 @@ int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages) · 30 unmodified lines |
| 652 | 651 | return 0; |
| 653 | 652 | out_undo: |
| 654 | 653 | mutex_unlock(&balloon_mutex); |
| 655 | | − xen_free_unpopulated_pages(pgno, pages); |
| 654 | + xen_free_ballooned_pages(pgno, pages); |
| 656 | 655 | /* |
| 657 | | − * NB: free_xenballooned_pages will only subtract pgno pages, but since |
| 656 | + * NB: xen_free_ballooned_pages will only subtract pgno pages, but since |
| 658 | 657 | * target_unpopulated is incremented with nr_pages at the start we need |
| 659 | 658 | * to remove the remaining ones also, or accounting will be screwed. |
| 660 | 659 | */ |
| 661 | 660 | balloon_stats.target_unpopulated -= nr_pages - pgno; |
| 662 | 661 | return ret; |
| 663 | 662 | } |
| 664 | | −EXPORT_SYMBOL(xen_alloc_unpopulated_pages); |
| 663 | +EXPORT_SYMBOL(xen_alloc_ballooned_pages); |
| 665 | 664 | |
| 666 | 665 | /** |
| 667 | | − * xen_free_unpopulated_pages - return pages retrieved with get_ballooned_pages |
| 666 | + * xen_free_ballooned_pages - return pages retrieved with get_ballooned_pages |
| 668 | 667 | * @nr_pages: Number of pages |
| 669 | 668 | * @pages: pages to return |
| 670 | 669 | */ |
| 671 | | −void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages) |
| 670 | +void xen_free_ballooned_pages(unsigned int nr_pages, struct page **pages) |
| 672 | 671 | { |
| 673 | 672 | unsigned int i; |
| 674 | 673 | |
| @@ -687,9 +686,9 @@ void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages) · 12 unmodified lines |
| 687 | 686 | |
| 688 | 687 | mutex_unlock(&balloon_mutex); |
| 689 | 688 | } |
| 690 | | −EXPORT_SYMBOL(xen_free_unpopulated_pages); |
| 689 | +EXPORT_SYMBOL(xen_free_ballooned_pages); |
| 691 | 690 | |
| 692 | | −#if defined(CONFIG_XEN_PV) |
| 691 | +#if defined(CONFIG_XEN_PV) && !defined(CONFIG_XEN_UNPOPULATED_ALLOC) |
| 693 | 692 | static void __init balloon_add_region(unsigned long start_pfn, |
| 694 | 693 | unsigned long pages) |
| 695 | 694 | { |
| @@ -712,7 +711,6 @@ static void __init balloon_add_region(unsigned long start_pfn, · 16 unmodified lines |
| 712 | 711 | balloon_stats.total_pages += extra_pfn_end - start_pfn; |
| 713 | 712 | } |
| 714 | 713 | #endif |
| 715 | | −#endif |
| 716 | 714 | |
| 717 | 715 | static int __init balloon_init(void) |
| 718 | 716 | { |