#include <linux/errno.h>
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/memremap.h>
#include <linux/slab.h>
#include <asm/page.h>
#include <xen/balloon.h>
#include <xen/page.h>
#include <xen/xen.h>
static DEFINE_MUTEX(list_lock);
static struct page *page_list;
static unsigned int list_count;
static struct resource *target_resource;
int __weak __init arch_xen_unpopulated_init(struct resource **res)
{ … }
static int fill_list(unsigned int nr_pages)
{ … }
int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages)
{ … }
EXPORT_SYMBOL(…);
void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages)
{ … }
EXPORT_SYMBOL(…);
static int __init unpopulated_init(void)
{ … }
early_initcall(unpopulated_init);