Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932908Ab2HPP4d (ORCPT ); Thu, 16 Aug 2012 11:56:33 -0400 Received: from smtp.citrix.com ([66.165.176.89]:58234 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932892Ab2HPP42 (ORCPT ); Thu, 16 Aug 2012 11:56:28 -0400 X-IronPort-AV: E=Sophos;i="4.77,778,1336363200"; d="scan'208";a="34872752" From: Stefano Stabellini To: CC: , , , , , , , , , Stefano Stabellini Subject: [PATCH v3 17/25] xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree Date: Thu, 16 Aug 2012 16:36:09 +0100 Message-ID: <1345131377-14713-17-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 42 Only until we get the balloon driver to work. Signed-off-by: Stefano Stabellini Acked-by: Konrad Rzeszutek Wilk --- 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 14af29d..3348d90 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); -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/