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: 26111 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0C716236AC for ; Wed, 12 Mar 2014 13:40:58 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id uq10sf24885532igb.1 for ; Wed, 12 Mar 2014 06:40:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=k8iT2E5NvZaJFtLoAFN+glAOfLC89zG33ffIcIHFAds=; b=boeCJZkFkjdEcki3bIWVmdxrGA6cIwB1Ip5FaznrNc6ONDTaulOLM6GIVVLQcDlzW6 Jo6FEAo34gqR4qh0JNGWOALqN/WUJzU1Oe/7VfAzkx0Ticn84Sla2p7y/3jLvhCY34vl PN3ZJzYGGgfeRWeDZWNl7yFlmXJSkT8pWPNXDRtE+YMtdRihh6+srei1m5af0yy7//4a a+aXkUacFPLlr91wFhqBf6QUtyzW4xkFuF+bfLhgxYf6OnRzUc8Cch6fQ3ODjo3mQsWa oxWq57Gg0mkrYdU8aQAdTi0wFiR5r7vYznVEYpW5HPDkpsz8vu7bCsIQdnME6BGGnGmb aX2w== X-Gm-Message-State: ALoCoQn0AZunFJmLFr+lvaF4/iUjnnEO6cPJ7odMYez63CQ3H+Mid1knxDLZqM7mF2AysnOEOHxt X-Received: by 10.43.125.196 with SMTP id gt4mr7864562icc.32.1394631658523; Wed, 12 Mar 2014 06:40:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.11 with SMTP id g11ls682108qgg.11.gmail; Wed, 12 Mar 2014 06:40:58 -0700 (PDT) X-Received: by 10.52.165.105 with SMTP id yx9mr14683542vdb.22.1394631658375; Wed, 12 Mar 2014 06:40:58 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id b20si6826208veu.30.2014.03.12.06.40.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Mar 2014 06:40:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oy12so10038234veb.18 for ; Wed, 12 Mar 2014 06:40:58 -0700 (PDT) X-Received: by 10.58.190.99 with SMTP id gp3mr517996vec.32.1394631658308; Wed, 12 Mar 2014 06:40:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.78.9 with SMTP id i9csp289420vck; Wed, 12 Mar 2014 06:40:57 -0700 (PDT) X-Received: by 10.194.58.180 with SMTP id s20mr1940964wjq.54.1394631657376; Wed, 12 Mar 2014 06:40:57 -0700 (PDT) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by mx.google.com with ESMTPS id wt1si23841988wjb.61.2014.03.12.06.40.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Mar 2014 06:40:57 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.45 is neither permitted nor denied by best guess record for domain of steve.capper@linaro.org) client-ip=74.125.82.45; Received: by mail-wg0-f45.google.com with SMTP id l18so10867390wgh.4 for ; Wed, 12 Mar 2014 06:40:57 -0700 (PDT) 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 Cc: will.deacon@arm.com, catalin.marinas@arm.com, linux@arm.linux.org.uk, chanho61.park@samsung.com, zishen.lim@linaro.org, patches@linaro.org, gary.robertson@linaro.org, michael.hudson@linaro.org, christoffer.dall@linaro.org, peterz@infradead.org, Steve Capper 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: steve.capper@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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