Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1206160ybl; Fri, 16 Aug 2019 10:38:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfmnWBA0Y7s73Xv+IXteA5AWoPiEOZRuLHhSYJu8In3OHscONZz3k+ZEuDIKHTA+hT2HgT X-Received: by 2002:a17:90a:23c8:: with SMTP id g66mr8303782pje.123.1565977083778; Fri, 16 Aug 2019 10:38:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565977083; cv=none; d=google.com; s=arc-20160816; b=AD0FI9ad2pFKJQoMGSJ9zG3u8jeo9J8lLQFYlhNSD1wDE6HpDKba/oFTFMTx7wgHJK PttYQU5CgpD1FvBjU1QqCipld6dcRHlOBBBnJt5AwUBVMvq2q68lcsQMRw2jNZEIzt2g LK0vbwmvo/3dnOKSRUkcYI5R3Szk7P9qyL2R3Euhx839h128k8uw2AaO7hXCUeCjdwvG BqXuORBfZ2uXpn3AjfWgs1I3QYPeghxXO7THmccLcg7biWI4ICzHIg9HwpY+zGAp5eDG jA02FEfURWA7+Eos1/45bh02Ew9h/GAxA/typ3iEhmLSvBP5AQxl4YDxJReszuBAf62C p8GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5bQMDuFS0BmScNZgcH5FV93GX99xnTTdjcwyCo75fZE=; b=oBXOD9/VJ4RE0eA6YQ3YWPkMmf8w+4uwZq99/ozUiThZXKtMRPIjjSKtzNi682DcF0 hdP9dEZRGt4WQH6H2y5DC4tQeH8rxv/VTtS1/QGEj7tvsL5+vzpDKJRPDg0QSgZo9MOF zKJs/dTlAx4SNgPaDNFqE/umRBx3j4QEFoCiiNvN18mPUBs+bRkAkNKS/tEWxBh1pY+n do0FfR4KCcB0HcMh51npxngWlcRmjyAGbpwXJUUJHBby15rgN0fbi1Y3w50mfayGjhAj Qy3aP/96rM56naUPn0nBnNFEbylJdXlDRGD0bAGMz3njZIsqxxYeypIwGAiKxSe1Taws Zcsw== 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 60si4400362plf.398.2019.08.16.10.37.48; Fri, 16 Aug 2019 10:38:03 -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 S1727504AbfHPRgF (ORCPT + 99 others); Fri, 16 Aug 2019 13:36:05 -0400 Received: from foss.arm.com ([217.140.110.172]:59492 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbfHPRgF (ORCPT ); Fri, 16 Aug 2019 13:36:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1FB0928; Fri, 16 Aug 2019 10:36:04 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1BA173F694; Fri, 16 Aug 2019 10:36:02 -0700 (PDT) Date: Fri, 16 Aug 2019 18:36:00 +0100 From: Mark Rutland To: Will Deacon Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, Guan Xuetao , Shawn Anastasio , Russell King , Catalin Marinas , Robin Murphy , Paul Burton , James Hogan , Geert Uytterhoeven , linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6] arm64: document the choice of page attributes for pgprot_dmacoherent Message-ID: <20190816173559.GB7417@lakrids.cambridge.arm.com> References: <20190816070754.15653-1-hch@lst.de> <20190816070754.15653-7-hch@lst.de> <20190816173118.4rbbzuogfamfa554@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190816173118.4rbbzuogfamfa554@willie-the-truck> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 16, 2019 at 06:31:18PM +0100, Will Deacon wrote: > Hi Christoph, > > Thanks for spinning this into a patch. > > On Fri, Aug 16, 2019 at 09:07:54AM +0200, Christoph Hellwig wrote: > > Based on an email from Will Deacon. > > > > Signed-off-by: Christoph Hellwig > > --- > > arch/arm64/include/asm/pgtable.h | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > > index 6700371227d1..6ff221d9a631 100644 > > --- a/arch/arm64/include/asm/pgtable.h > > +++ b/arch/arm64/include/asm/pgtable.h > > @@ -435,6 +435,14 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd) > > __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN) > > #define pgprot_device(prot) \ > > __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN) > > +/* > > + * DMA allocations for non-coherent devices use what the Arm architecture calls > > + * "Normal non-cacheable" memory, which permits speculation, unaligned accesses > > + * and merging of writes. This is different from "Strongly Ordered" memory > > + * which is intended for MMIO and thus forbids speculation, preserves access > > + * size, requires strict alignment and also forces write responses to come from > > + * the endpoint. > > + */ > > Mind if I tweak the second sentence to be: > > This is different from "Device-nGnR[nE]" memory which is intended for MMIO > and thus forbids speculation, preserves access size, requires strict > alignment and can also force write responses to come from the endpoint. > > ? It's a small change, but it better fits with the arm64 terminology > ("strongly ordered" is no longer used in the architecture). > > If you're happy with that, I can make the change and queue this patch > for 5.4. FWIW, with that wording: Acked-by: Mark Rutland Mark.