From patchwork Thu Apr 24 12:23:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 28961 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D342C203AC for ; Thu, 24 Apr 2014 12:25:38 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id jt11sf186330pbb.9 for ; Thu, 24 Apr 2014 05:25:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=qNDNbNSnHplFzHgFaTieGhhvkd9I3zIo+m+RDdntp7Q=; b=KSEXlOdXC1zLE85sFNPNxVQk9pUV9bdAGgcKrHTfTk2XQ5vwd1VQi06GDZqhMiZzEI YALrNBnZBWReTrPY7QeO054hs+VrboU4rU4fzVgNUmustO8DOgc7P6gs5kKDq5yzLnh4 6YTKpgae0IqYYMZy+x8BCGRSgS0QdToW3ATCmqmpWpD2UXWdJ47B7Zw2XN/EB4P8pNC7 aPUxaigJJrgwE09fAa5hqSRgTCF8Od7v8r+feAqK9nBErBh2qsWxIi3024isi4zbruEj k6rUxLqX9+h10rKdPxsnGj/GdDPSpFO/X6Ht4aDnIWaNP9kuEK7FcI59rKsoT09XCG+6 zvew== X-Gm-Message-State: ALoCoQku14xrVIIYpTWdCLzY/nuZYKGhzpt4dLwNCYj/m02CMVXtVzYBiS2FI01AnhfT7jDVsP2K X-Received: by 10.68.216.230 with SMTP id ot6mr1047600pbc.3.1398342338113; Thu, 24 Apr 2014 05:25:38 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.229 with SMTP id t92ls1134091qgd.9.gmail; Thu, 24 Apr 2014 05:25:38 -0700 (PDT) X-Received: by 10.220.166.211 with SMTP id n19mr36272vcy.69.1398342337987; Thu, 24 Apr 2014 05:25:37 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id d20si879468veu.43.2014.04.24.05.25.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 05:25:37 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id im17so2888301vcb.0 for ; Thu, 24 Apr 2014 05:25:37 -0700 (PDT) X-Received: by 10.221.62.131 with SMTP id xa3mr1036242vcb.13.1398342337900; Thu, 24 Apr 2014 05:25:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp11677vcb; Thu, 24 Apr 2014 05:25:37 -0700 (PDT) X-Received: by 10.140.84.134 with SMTP id l6mr1952503qgd.96.1398342337538; Thu, 24 Apr 2014 05:25:37 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id l5si2067581qai.77.2014.04.24.05.25.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Apr 2014 05:25:37 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdIhP-0007Rh-D3; Thu, 24 Apr 2014 12:24:19 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdIhM-0007MO-Eq for linux-arm-kernel@lists.infradead.org; Thu, 24 Apr 2014 12:24:17 +0000 Received: by mail-wi0-f172.google.com with SMTP id hi2so949990wib.17 for ; Thu, 24 Apr 2014 05:23:53 -0700 (PDT) X-Received: by 10.194.9.36 with SMTP id w4mr862023wja.79.1398342233013; Thu, 24 Apr 2014 05:23:53 -0700 (PDT) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id lj15sm10366407wic.13.2014.04.24.05.23.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Apr 2014 05:23:52 -0700 (PDT) From: Steve Capper To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: mm: Add THP TLB entries to general mmu_gather Date: Thu, 24 Apr 2014 13:23:38 +0100 Message-Id: <1398342218-31830-1-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140424_052416_653724_4010974E X-CRM114-Status: GOOD ( 10.04 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.172 listed in list.dnswl.org] Cc: catalin.marinas@arm.com, Steve Capper 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+patch=linaro.org@lists.infradead.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: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 When arm64 moved over to the core mmu_gather, it lost the logic to flush THP TLB entries (tlb_remove_pmd_tlb_entry was removed and the core implementation only signals that the mmu_gather needs a flush). This patch ensures that tlb_add_flush is called for THP TLB entries. Signed-off-by: Steve Capper Acked-by: Will Deacon --- arch/arm64/include/asm/pgtable.h | 2 ++ arch/arm64/include/asm/tlb.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index aa3917c..9886368 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -434,6 +434,8 @@ extern int kern_addr_valid(unsigned long addr); #define pgtable_cache_init() do { } while (0) +#define __tlb_remove_pmd_tlb_entry __tlb_remove_pmd_tlb_entry + #endif /* !__ASSEMBLY__ */ #endif /* __ASM_PGTABLE_H */ diff --git a/arch/arm64/include/asm/tlb.h b/arch/arm64/include/asm/tlb.h index 72cadf5..fa2255e 100644 --- a/arch/arm64/include/asm/tlb.h +++ b/arch/arm64/include/asm/tlb.h @@ -99,5 +99,10 @@ static inline void __pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmdp, } #endif +static inline void __tlb_remove_pmd_tlb_entry(struct mmu_gather *tlb, pmd_t *pmdp, + unsigned long address) +{ + tlb_add_flush(tlb, address); +} #endif