Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1201335ybl; Fri, 16 Aug 2019 10:32:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0Y0gO5ishms/OuqhDPVHBXlZdluv52dphWMPfjMUTUZ0D2bOHQWxAHQegPS1CPY4PYqqd X-Received: by 2002:a63:1c22:: with SMTP id c34mr8736589pgc.56.1565976764583; Fri, 16 Aug 2019 10:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565976764; cv=none; d=google.com; s=arc-20160816; b=psSvST1VhspAnsrMgMzCZ72QWre7nqIERuSnVUbdzgUShBl9iZOgLTh7iDvBpZIkeC SPw76KlVrrd1BtjcqBqS5H8KkjIjiNQWxqU1dRMjzgOv1XeE3PoF+XUfiT8aFyEuIqkx eGODPJWrQAszqQmCsSuhHxk1XYPPfv28lcOjyDydEDpM8XUj7KkMLPqs0N+0cWihxO4j WMgR5W6MktVw5crAlMic7eJjnS3BVPF2A2FOEdTr6T1B/urDxsTMWwWedoCPUFkB0YHh HkyqipyKjF9sPXCbtChsf/iqDqmo5Y7Hwh303uCkHT+FAs1HzdCYL0TSE4uWfy7/tWqH b5fg== 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:dkim-signature; bh=WeJdwbMGl3TkJJB3lD3rTeMYa6gW8H71RyIVk/VdAKs=; b=pmDldt4vLpJBZT5etGtrltZ2fDh2FfFY/tYb6pz9M4RPC/nvITGz0DsQffy5ZOxTdu 7O14HCheJpP1hY5cBY8Nm/EsYvQ2fcRTKHEEa/CdYRbpDOMNTEX87xnYhMfKRAA+3AAD gD7byTNQiYUgEZV8mx6eKPHBLliAoks2fpo9nQtWuYBMNdZrJ1ZsQhUB4ZZ4P6PIKcdc fMZViBfEEukSp55dGNlDqNHu98qjoQ6N9ugUkUV7zID5PmfTw6+Vq8/Xpv1P0T2uN6cA 4xdyXPXRwR+1NdWLqurwX4fsRjxtvGTkcD4OKqLln+scXxaPX9zYmVtik6NJ6LMuEJ6o 5Xjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LaAnW7Hy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si4750491pfo.68.2019.08.16.10.32.29; Fri, 16 Aug 2019 10:32:44 -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; dkim=pass header.i=@kernel.org header.s=default header.b=LaAnW7Hy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727585AbfHPRbZ (ORCPT + 99 others); Fri, 16 Aug 2019 13:31:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:53278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726824AbfHPRbY (ORCPT ); Fri, 16 Aug 2019 13:31:24 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7983D2086C; Fri, 16 Aug 2019 17:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565976683; bh=7UbpCD1eMEdhuE0pVTSmVthW5ADpKtqL/oqKqCN+HEw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LaAnW7Hy029sRfOJ26P9ooRMDVttHdguTvMjat5nc99EUXzMN+g9WMxOwM1dXJPb5 bzS+jtNUqmYhQDy0h+E7F6sfWJBaB+AAIxRpe05xEh7d5AcpaSW6E2fETpzfwyN7Jv fjwn73EdjqvOR3Xn6IGkIW6zAlcnUI3ffOP7Clmo= Date: Fri, 16 Aug 2019 18:31:18 +0100 From: Will Deacon To: Christoph Hellwig Cc: 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: <20190816173118.4rbbzuogfamfa554@willie-the-truck> References: <20190816070754.15653-1-hch@lst.de> <20190816070754.15653-7-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190816070754.15653-7-hch@lst.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Will