lkml.org 
[lkml]   [2012]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 16/24] xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
    Date
    Only until we get the balloon driver to work.

    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    ---
    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 60d6d36..1476b0b 100644
    --- a/arch/arm/xen/enlighten.c
    +++ b/arch/arm/xen/enlighten.c
    @@ -121,6 +121,24 @@ int __init xen_guest_init(void)
    return 0;
    }
    EXPORT_SYMBOL_GPL(xen_guest_init);
    +
    +/* 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);
    core_initcall(xen_guest_init);

    static irqreturn_t xen_arm_callback(int irq, void *arg)
    --
    1.7.2.5


    \
     
     \ /
      Last update: 2012-07-26 19:01    [W:3.265 / U:0.460 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site