Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3003365imm; Fri, 24 Aug 2018 08:55:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZrSt03pr6UmCiNQYkNHTp2+CNNHh/2x+80g41XmnygsrPnWZM73haRcH/lzKVo8TGVE5G9 X-Received: by 2002:a63:cd4c:: with SMTP id a12-v6mr2300067pgj.15.1535126112662; Fri, 24 Aug 2018 08:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535126112; cv=none; d=google.com; s=arc-20160816; b=nQD7n2bxY8pygRzEdxviNpisAncFSmKW8PpWgrb+5rG/2iY9c85U+u4tJAYDRIefWy /8Jsc2H4fb8BFnowDyT/3NOjV5nWHR7Ok/51VNeJH+KwlyI57C0mc/2GU+QSjAhHXnOl bkBxdT5rWVKhjeJ2t/QdYi/JZiupUWbTFdHjFepntKGfctxyuOkC2MrTqhiR76BsWZzH JPncDcrSYKFQYlnrNW9gaHW3XOpPXZp/5IiP+uuMt5NkECH6xsG1G8Plsc6mlkSeToLJ mxv9+RncQJ4jFXV5q3FeNCeuWrkuxqWq6CdSrOZ/8YvSaHTFn9K9b8wVGNI1EphdX1lZ 4kVQ== 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=RozllPryD3GkPRtMWEWjoDAYyDfgAVoUGTzvkBtaSfE=; b=NQDty45btUc8vKbxtJvd+/NIDTB/UuApUv5OQTb8G/Vu72rF8JRhk1rBxPOATayrNt tszkGYQnYxzH7LmnZKctMLGQcdXyLYzPFq/XxdfyrqoHlAtHjMP4FYvfsNrxgKLvuGDK aTxusPFhfLivTp1aytUj1RbLw/kqjRh9F9I6FjIHoORc6rRd/Qu2sSzS8ZllfiH+muc1 ncp4/HNxf666TqjbXzu3t8op/vJ0NZ9SPYnTZiCtfas0Su8BhRaO2RQlEQNbm5k8SnuQ MQGlJlPPcAU4uoN8IDDN+jxSQdATkbKOGoPhH9tlIMYvKheV0rycHUylVLD1qvnhLeSB EdmQ== 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 t8-v6si6177659pgq.248.2018.08.24.08.54.57; Fri, 24 Aug 2018 08:55:12 -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 S1727518AbeHXT1v (ORCPT + 99 others); Fri, 24 Aug 2018 15:27:51 -0400 Received: from foss.arm.com ([217.140.101.70]:32816 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726374AbeHXT1v (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 F09FC1650; Fri, 24 Aug 2018 08:52:37 -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 C25043F7BE; Fri, 24 Aug 2018 08:52:37 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id B7AB01AE3265; 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 02/11] arm64: tlb: Add DSB ISHST prior to TLBI in __flush_tlb_[kernel_]pgtable() Date: Fri, 24 Aug 2018 16:52:37 +0100 Message-Id: <1535125966-7666-3-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 __flush_tlb_[kernel_]pgtable() rely on set_pXd() having a DSB after writing the new table entry and therefore avoid the barrier prior to the TLBI instruction. In preparation for delaying our walk-cache invalidation on the unmap() path, move the DSB into the TLB invalidation routines. Signed-off-by: Will Deacon --- arch/arm64/include/asm/tlbflush.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index 7e2a35424ca4..e257f8655b84 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -213,6 +213,7 @@ static inline void __flush_tlb_pgtable(struct mm_struct *mm, { unsigned long addr = __TLBI_VADDR(uaddr, ASID(mm)); + dsb(ishst); __tlbi(vae1is, addr); __tlbi_user(vae1is, addr); dsb(ish); @@ -222,6 +223,7 @@ static inline void __flush_tlb_kernel_pgtable(unsigned long kaddr) { unsigned long addr = __TLBI_VADDR(kaddr, 0); + dsb(ishst); __tlbi(vaae1is, addr); dsb(ish); } -- 2.1.4