From patchwork Thu Aug 30 16:15:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 145545 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp91918ljw; Thu, 30 Aug 2018 09:16:16 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZmbS2n1xIn0wiG9Cyb7nAXeJ1Uv+3IGgziCtNVgWqoGb41Iv8CL4/WRuuCX4a4LDeuHKrd X-Received: by 2002:a62:8913:: with SMTP id v19-v6mr11199903pfd.127.1535645776821; Thu, 30 Aug 2018 09:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535645776; cv=none; d=google.com; s=arc-20160816; b=R6M3V+iK3Z6v+mDgVwxSi4dBf2kmvZo5aN5el+zNxMPKomThZgaV6K93MOHiEzXbEN IgKRk9AfQ3DIDd2jwD1wLt9G3wwvXiX0AeVYtEtXoTDjmmDCF8u50ubk/EbmzgYBD652 D5793rsvSCB2O0CbrUBjddarJrtC8glEMnpb3EHUjuAeM1nz7S6Msv3U1oNUTvtKlCyH rejhAz2ZVo4D3hBcLboiGLgJsyNmTJWdMNTUVjgAIvfZrW8nVCKl2I82RE+hNrzxGVvv nML/Kz+14vChEOt+ZJZOjcam0EPyrhKQk9WUZcLkoUxO3JS7NSpyPzghUSbBtDvapTsM WbAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=O/F+Wwa3qzWoWLG2ynBUoJAdpqUksovup4kAYC73rqk=; b=fukbwWVHUwqRKoWeRAT21kHGQpvZ59zSaUw0Kc+ElzSKohwYrxjv2XW7jqztQXH90+ JkSUF//wqlCtmWIg5Ymy/UTEENxBGTYiyzwS7cbVLSU8dVJlZdIPzHSiuMf8d3bmeR7R 2kzB8XsJ74MCvcsHaEpf25fcU3vqUAmsfNGI9EAPdvElKJv/K3D6Vij+Who7DXGZXlaz BQ2Xu+r63894k8XSLGDii3+vIKVArrJbwcJgYu6YXztRi2p5aBu/j6Ts0GPVCOKj+ClF 1UDEntLYx6izhP0jrSwTxL/x5rH0DqMWOdoK9uk8u2e/Zr0+yGXd+sd0cZj8Nbzxqsn0 k2yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7-v6si7273901pgh.307.2018.08.30.09.16.16; Thu, 30 Aug 2018 09:16:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727633AbeH3USm (ORCPT + 32 others); Thu, 30 Aug 2018 16:18:42 -0400 Received: from foss.arm.com ([217.140.101.70]:44834 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbeH3USl (ORCPT ); Thu, 30 Aug 2018 16:18:41 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3B26B168F; Thu, 30 Aug 2018 09:15:49 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0CED33F557; Thu, 30 Aug 2018 09:15:49 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 4AF5A1AE36AF; Thu, 30 Aug 2018 17:16:01 +0100 (BST) From: Will Deacon To: linux-kernel@vger.kernel.org Cc: peterz@infradead.org, benh@au1.ibm.com, torvalds@linux-foundation.org, npiggin@gmail.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, Will Deacon Subject: [PATCH 04/12] arm64: tlb: Justify non-leaf invalidation in flush_tlb_range() Date: Thu, 30 Aug 2018 17:15:38 +0100 Message-Id: <1535645747-9823-5-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1535645747-9823-1-git-send-email-will.deacon@arm.com> References: <1535645747-9823-1-git-send-email-will.deacon@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a comment to explain why we can't get away with last-level invalidation in flush_tlb_range() Signed-off-by: Will Deacon --- arch/arm64/include/asm/tlbflush.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.1.4 diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index e257f8655b84..ddbf1718669d 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -182,6 +182,10 @@ static inline void __flush_tlb_range(struct vm_area_struct *vma, static inline void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { + /* + * We cannot use leaf-only invalidation here, since we may be invalidating + * table entries as part of collapsing hugepages or moving page tables. + */ __flush_tlb_range(vma, start, end, false); }