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: 4050301 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 1538DBFF02 for ; Thu, 24 Apr 2014 12:26:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B22620303 for ; Thu, 24 Apr 2014 12:26:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 48234202F8 for ; Thu, 24 Apr 2014 12:26:14 +0000 (UTC) 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-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; bh=Jb9Z7bz3LIHyFKzTQhdymWkjHBScMqv4WmkIsSUhWXs=; b=DXhm7Fecz73LdUQ5WVIVPqo2nrzy2KYXyq1jvmmNBrhx8xCyVlY2WXjjTGEF4XmRfS 6OsFN+KvNatif9YRZDD/daZ408G+xPxbLh9+eZOUDKBOKk/wUDlIN2lPoQs3E+QrKVEM yZO9TK7mx2i3NSFi7b7u9S0k0E4tejNl+ocFjayEhJWbsgg74mSnQtQCV5BpXu5JZjVg 6YueCJ5BB9W1eC79qc/vOy2EB9n/NYvSV+Gp07iXmHjrSTTf7T7LWvtkGMr1yMuWPKSM TGo2QfMxhOEVHXRG3gxdXGf4fdF81q5jJAMQzSF52/LoUs1/uBZzCRyxfruRNzwIstH4 P4yg== X-Gm-Message-State: ALoCoQmsFQkpmRbhMLA6J390HTwcE0BdFlelxRdlEFW6orbbeJYS6fccRJg6hEAXpHT/Yx8L/cVn 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 (/) 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,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 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