diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-08-08 17:20:58 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-08-08 17:20:58 +0000 |
commit | ea54209b16cbecad8928f6067af29069ac44e360 (patch) | |
tree | 8c0045d3beba26e27bb1002dac5a009b92c66429 /arch/arm | |
parent | 0ec53ecf38bcbf95b4b057328a8fbba4d22ef28b (diff) | |
download | op-kernel-dev-ea54209b16cbecad8928f6067af29069ac44e360.zip op-kernel-dev-ea54209b16cbecad8928f6067af29069ac44e360.tar.gz |
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/xen/enlighten.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index bad67ad..59bcb96 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -148,3 +148,21 @@ static int __init xen_init_events(void) return 0; } postcore_initcall(xen_init_events); + +/* XXX: only until balloon is properly working */ +int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem) +{ + *pages = alloc_pages(highmem ? GFP_HIGHUSER : GFP_KERNEL, + get_order(nr_pages)); + if (*pages == NULL) + return -ENOMEM; + return 0; +} +EXPORT_SYMBOL_GPL(alloc_xenballooned_pages); + +void free_xenballooned_pages(int nr_pages, struct page **pages) +{ + kfree(*pages); + *pages = NULL; +} +EXPORT_SYMBOL_GPL(free_xenballooned_pages); |