From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id F0B1C8D003A for ; Mon, 14 Mar 2011 13:50:51 -0400 (EDT) Received: by qyk30 with SMTP id 30so5105318qyk.14 for ; Mon, 14 Mar 2011 10:50:50 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 14 Mar 2011 17:50:49 +0000 Message-ID: Subject: [RFC][PATCH v2 12/23] (parisc) __vmalloc: add gfp flags variant of pte and pmd allocation From: Prasad Joshi Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Prasad Joshi , Anand Mitra , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, Kyle McMartin , Helge Deller , "James E.J. Bottomley" , linux-parisc@vger.kernel.org __vmalloc: propagating GFP allocation flag. - adds functions to allow caller to pass the GFP flag for memory allocation - helps in fixing the Bug 30702 (__vmalloc(GFP_NOFS) can callback file system evict_inode). Signed-off-by: Anand Mitra Signed-off-by: Prasad Joshi --- Chnagelog: arch/parisc/include/asm/pgalloc.h | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) --- diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h index fc987a1..0284a43 100644 --- a/arch/parisc/include/asm/pgalloc.h +++ b/arch/parisc/include/asm/pgalloc.h @@ -61,15 +61,20 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) (__u32)(__pa((unsigned long)pmd) >> PxD_VALUE_SHIFT)); } -static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) +static inline pmd_t * +__pmd_alloc_one(struct mm_struct *mm, unsigned long address, gfp_t gfp_mask) { - pmd_t *pmd = (pmd_t *)__get_free_pages(GFP_KERNEL|__GFP_REPEAT, - PMD_ORDER); + pmd_t *pmd = (pmd_t *)__get_free_pages(gfp_mask, PMD_ORDER); if (pmd) memset(pmd, 0, PAGE_SIZE< email@kvack.org