Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree

Only until we get the balloon driver to work.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

+18
+18
arch/arm/xen/enlighten.c
··· 148 148 return 0; 149 149 } 150 150 postcore_initcall(xen_init_events); 151 + 152 + /* XXX: only until balloon is properly working */ 153 + int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem) 154 + { 155 + *pages = alloc_pages(highmem ? GFP_HIGHUSER : GFP_KERNEL, 156 + get_order(nr_pages)); 157 + if (*pages == NULL) 158 + return -ENOMEM; 159 + return 0; 160 + } 161 + EXPORT_SYMBOL_GPL(alloc_xenballooned_pages); 162 + 163 + void free_xenballooned_pages(int nr_pages, struct page **pages) 164 + { 165 + kfree(*pages); 166 + *pages = NULL; 167 + } 168 + EXPORT_SYMBOL_GPL(free_xenballooned_pages);