Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757381Ab1CRUAK (ORCPT ); Fri, 18 Mar 2011 16:00:10 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:42706 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757034Ab1CRUAG (ORCPT ); Fri, 18 Mar 2011 16:00:06 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=dK09WSGkR9bg+TB1nTurAOKVDqU8afA6Qj8rVnDD51FnF1ARJcqt2wVPwSguCjDIhR 9S7UcesNq+UeZ9dL/00bbQonYOGOYz6yT8m68iMOwrVuzJfRE0tRHKjL5EL8kFhs2i3O 3XWx4FAJ+zX8jm3kEvQZOBF/uSIM99niMcmTc= Date: Fri, 18 Mar 2011 20:00:45 +0000 From: Prasad Joshi To: dhowells@redhat.com, yasutake.koichi@jp.panasonic.com, linux-am33-list@redhat.com, linux-kernel@vger.kernel.org, prasadjoshi124@gmail.com, mitra@kqinfotech.com Subject: Re: [RFC][PATCH v3 12/22] mm, mn10300: add gfp flags variant of pte allocations Message-ID: <20110318200045.GM4746@prasad-kvm> References: <20110318194600.GC4746@prasad-kvm> <20110318194740.GD4746@prasad-kvm> <20110318194929.GE4746@prasad-kvm> <20110318195035.GF4746@prasad-kvm> <20110318195141.GG4746@prasad-kvm> <20110318195307.GH4746@prasad-kvm> <20110318195507.GI4746@prasad-kvm> <20110318195643.GJ4746@prasad-kvm> <20110318195754.GK4746@prasad-kvm> <20110318195926.GL4746@prasad-kvm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110318195926.GL4746@prasad-kvm> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2233 Lines: 63 - Added __pte_alloc_one_kernel to allocate page using specified GFP flag - Changed pte_alloc_one_kernel to call __pte_alloc_one_kernel using GFP_KERNEL | __GFP_REPEAT allocation flags - Helps in fixing the Bug 30702 Signed-off-by: Prasad Joshi Signed-off-by: Anand Mitra --- arch/mn10300/include/asm/pgalloc.h | 2 ++ arch/mn10300/mm/pgtable.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/mn10300/include/asm/pgalloc.h b/arch/mn10300/include/asm/pgalloc.h index 146bacf..35150ae 100644 --- a/arch/mn10300/include/asm/pgalloc.h +++ b/arch/mn10300/include/asm/pgalloc.h @@ -37,6 +37,8 @@ extern pgd_t *pgd_alloc(struct mm_struct *); extern void pgd_free(struct mm_struct *, pgd_t *); extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); +extern pte_t *__pte_alloc_one_kernel(struct mm_struct *, unsigned long, gfp_t); + extern struct page *pte_alloc_one(struct mm_struct *, unsigned long); static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) diff --git a/arch/mn10300/mm/pgtable.c b/arch/mn10300/mm/pgtable.c index 450f7ba..05077b4 100644 --- a/arch/mn10300/mm/pgtable.c +++ b/arch/mn10300/mm/pgtable.c @@ -62,14 +62,20 @@ void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags) local_flush_tlb_one(vaddr); } -pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) +pte_t *__pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address, + gfp_t gfp_mask) { - pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); + pte_t *pte = (pte_t *)__get_free_page(gfp_mask); if (pte) clear_page(pte); return pte; } +pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) +{ + return __pte_alloc_one_kernel(mm, address, GFP_KERNEL | __GFP_REPEAT); +} + struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) { struct page *pte; -- 1.7.0.4 -- 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/