From patchwork Fri Aug 24 15:52:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 145084 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1411235ljw; Fri, 24 Aug 2018 08:53:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaC855vARgwJPgNmm3IndlR5TYz/QAHk06lgcxyAbbdqZEK9jRaqLNC+TnCvt2raIReU1vr X-Received: by 2002:a62:4898:: with SMTP id q24-v6mr2651217pfi.22.1535126021009; Fri, 24 Aug 2018 08:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535126021; cv=none; d=google.com; s=arc-20160816; b=BanaIq7u/zdfqhPwZnW4rgBFIv43goYsROHCvLbwz3J/kUtGNAnS8UPHGUF4d3Ig0p KWoHdBcrnwt/KGnsenU0l0pt8dhO5eyne3/CXIVQ7l6nBEw/ORDpCcnAhiBKs6Tt6QY0 bBAmXdU4vrMCU5i/nIURLrTqDGTSto4c2Ss1cS18tGyxqr2jYbPd1mWDUniJiF9u60xW nKcw6B7n/sJaxe1+hxlqCUcfwb2Xrkb6e7qS8x15NiCFNS2cxtHzSUPCEI0HlQZw+i6M s2R3GufqMq4idHfMKoWdjHxYObGtcKRWQ1Nys079f48XOP/3lnyiu8pt/ybCxm2lB87n dzCw== 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=ikSoBBQvX1QM+emmd27XwjDSDSmrIF5yqCayDuXRcu5oRRYOzUBtf+Yd/jEmdI80VO 9+suT4KNSPD39Nfm73AHOOnj1Q7v3eDPwl2/VCqOvvw797o3me4q09h9mfJ+aCUeuUyR Hzq1T+1KMb74xvyn4StpXyC5IXtE9wnk1o595CipNBtLw4hL0X53YF7bY4zLuMY3ApLc 8S4lOSGLom4nXyXAd/hLrxI5RVsga9lN3s9IHgplmx3uAgehUEk/iSzRtwuYPORxrCV1 1Bhv+BtSc+mh4/81JhcG8xN11Ai4BCRvHqvXN7JSMTtbSD+Ebn19bHL281YJayRrBIds Ip8w== 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 g34-v6si7159766pld.244.2018.08.24.08.53.40; Fri, 24 Aug 2018 08:53:41 -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 S1728183AbeHXT2w (ORCPT + 32 others); Fri, 24 Aug 2018 15:28:52 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:32846 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbeHXT1v (ORCPT ); Fri, 24 Aug 2018 15:27:51 -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 1B48D1688; Fri, 24 Aug 2018 08:52:38 -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 E14263F5BC; Fri, 24 Aug 2018 08:52:37 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id D63031AE3318; Fri, 24 Aug 2018 16:52:47 +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: [RFC PATCH 04/11] arm64: tlb: Justify non-leaf invalidation in flush_tlb_range() Date: Fri, 24 Aug 2018 16:52:39 +0100 Message-Id: <1535125966-7666-5-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1535125966-7666-1-git-send-email-will.deacon@arm.com> References: <1535125966-7666-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); }