From patchwork Wed Mar 12 13:40:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 3817821 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9090BBF540 for ; Wed, 12 Mar 2014 13:49:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0334201C7 for ; Wed, 12 Mar 2014 13:49:33 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1F1E201BB for ; Wed, 12 Mar 2014 13:49:32 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNjV0-0006MW-3P; Wed, 12 Mar 2014 13:47:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNjQ3-00032p-50; Wed, 12 Mar 2014 13:42:03 +0000 Received: from mail-wi0-f176.google.com ([209.85.212.176]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNjPK-0002vg-Ju for linux-arm-kernel@lists.infradead.org; Wed, 12 Mar 2014 13:41:34 +0000 Received: by mail-wi0-f176.google.com with SMTP id hr14so2398997wib.15 for ; Wed, 12 Mar 2014 06:40:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k8iT2E5NvZaJFtLoAFN+glAOfLC89zG33ffIcIHFAds=; b=nKIrOIA1qI383cWCIoNIV6gTG5Hg614cDqQXsmpStESbHy2mwvGzj+b/q9UgZb3HWt F0jS/BoIfOuDcLEbPiPoLb39hMEH8Fy618AehnZD1d9Ct0lJGwMeJ2C9bjz6ffr45bKe C90PgJE9kJj6AmY33eCIInooXIb5TjSCbgsG/yDKdss2Q7/P0elc1053T9ba5UpdI6Cp fkGuf5B6j7RjsWSrk3pid7xOBMAM9XrHcDI02fe9d1/SKhDtnbKBEUsX0ptWRC3AYwag NJh0YoaRfM8TSqEdl+yj733nGlv92ouhExXZyi5vTLRyfm2b75iLUPt69p+uknF1We50 OVaA== X-Gm-Message-State: ALoCoQkkfP5fbW7/A8znUjTdgtN4phYNAdfasjzawHEilQ8V7DPnbPkBUClXw+WtM8pHNd8b5CVK X-Received: by 10.194.92.147 with SMTP id cm19mr18818279wjb.37.1394631656938; Wed, 12 Mar 2014 06:40:56 -0700 (PDT) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id j8sm11095886wjn.13.2014.03.12.06.40.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Mar 2014 06:40:56 -0700 (PDT) From: Steve Capper To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH V3 6/6] arm64: mm: Activate get_user_pages_fast for arm64 Date: Wed, 12 Mar 2014 13:40:23 +0000 Message-Id: <1394631623-17883-7-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1394631623-17883-1-git-send-email-steve.capper@linaro.org> References: <1394631623-17883-1-git-send-email-steve.capper@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140312_094118_848525_53F419AD X-CRM114-Status: UNSURE ( 8.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: zishen.lim@linaro.org, linux@arm.linux.org.uk, patches@linaro.org, michael.hudson@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, peterz@infradead.org, gary.robertson@linaro.org, Steve Capper , chanho61.park@samsung.com, christoffer.dall@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The get_user_pages fast implementation in arch/arm is valid for arm64 too. This patch references get_user_pages_fast from arch/arm, rather than duplicate the code. Signed-off-by: Steve Capper --- arch/arm64/include/asm/pgtable.h | 6 ++++++ arch/arm64/mm/Makefile | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index aa3917c..d5ae326 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -242,9 +242,15 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, #define __HAVE_ARCH_PMD_WRITE #define pmd_write(pmd) (!(pmd_val(pmd) & PMD_SECT_RDONLY)) +#define pmd_thp_or_huge(pmd) (pmd_huge(pmd) || pmd_trans_huge(pmd)) + #ifdef CONFIG_TRANSPARENT_HUGEPAGE #define pmd_trans_huge(pmd) (pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT)) #define pmd_trans_splitting(pmd) (pmd_val(pmd) & PMD_SECT_SPLITTING) +#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH +struct vm_area_struct; +void pmdp_splitting_flush(struct vm_area_struct *vma, unsigned long address, + pmd_t *pmdp); #endif #define PMD_BIT_FUNC(fn,op) \ diff --git a/arch/arm64/mm/Makefile b/arch/arm64/mm/Makefile index b51d364..212f229 100644 --- a/arch/arm64/mm/Makefile +++ b/arch/arm64/mm/Makefile @@ -1,5 +1,7 @@ +ARM=../../../arch/arm/mm + obj-y := dma-mapping.o extable.o fault.o init.o \ cache.o copypage.o flush.o \ ioremap.o mmap.o pgd.o mmu.o \ - context.o tlb.o proc.o + context.o tlb.o proc.o $(ARM)/gup.o obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o