From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753249AbcFJKOj (ORCPT ); Fri, 10 Jun 2016 06:14:39 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:12794 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753207AbcFJKOg (ORCPT ); Fri, 10 Jun 2016 06:14:36 -0400 X-AuditID: cbfec7f5-f792a6d000001302-5d-575a93025fdc From: Krzysztof Kozlowski To: Andrew Morton Cc: hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Will Deacon , Joerg Roedel , Robin Murphy , Christian Borntraeger , "Luis R. Rodriguez" , Zhen Lei , linux-kernel@vger.kernel.org Subject: [PATCH v4 44/44] dma-mapping: Document the DMA attributes next to the declaration Date: Fri, 10 Jun 2016 12:12:01 +0200 Message-id: <1465553521-27303-45-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1465553521-27303-1-git-send-email-k.kozlowski@samsung.com> References: <1465553521-27303-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOLMWRmVeSWpSXmKPExsVy+t/xa7pMk6PCDa5vk7WYs34Nm8XGGetZ Laav2M5icXrCIiaLyafmMlm8fmFocXnXHDaL5yf3Mlsc/PCE1eLJr09sFi8/nmBx4PZYM28N o8fBR4fYPFqOvGX12LxCy+PEjN8sHn1bVjF6rN9ylcVj8+lqj8+b5AI4o7hsUlJzMstSi/Tt Ergypjy0LJguVDHt22OmBsaffF2MHBwSAiYSt5YWdTFyApliEhfurWfrYuTiEBJYyijxc/kc KKeRSeLzvF5WkCo2AWOJzcuXsIHYIgK6Eque72IGKWIW6GKWWHJ1NzNIQlggRuLZipOsIBtY BFQlXvwxAgnzCnhIbDv9gR1im5zEyWOTwWZyAsW7785kAbGFBNwltj95xTSBkXcBI8MqRtHU 0uSC4qT0XCO94sTc4tK8dL3k/NxNjJDg/LqDcekxq0OMAhyMSjy8Ebsiw4VYE8uKK3MPMUpw MCuJ8Fr0RYUL8aYkVlalFuXHF5XmpBYfYpTmYFES5525632IkEB6YklqdmpqQWoRTJaJg1Oq gbE8yua17zt1xny+9Lp/KnMOKy9f36h94mNa1jPVbvtdRl3xaj84T206VH7Tu3G+t6PuRx+f 73/vT5HjuOgjr3R5hsqmN/NcJXUu926z2np1b2Du085OSa3nJ4OPiVyZ4DBn4WaBtfOu1z47 zpfHa1G0mknV6fuSA6Y3RNQuMnrq7Yr6/W3l/RQlluKMREMt5qLiRAA0veP6SgIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Copy documentation abstract about each DMA attribute from Documentation/DMA-attributes.txt to the place with declaration. Suggested-by: Christoph Hellwig Signed-off-by: Krzysztof Kozlowski --- include/linux/dma-mapping.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index d8fb67783cb7..66533e18276c 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -14,14 +14,47 @@ /** * List of possible attributes associated with a DMA mapping. The semantics * of each attribute should be defined in Documentation/DMA-attributes.txt. + * + * DMA_ATTR_WRITE_BARRIER: DMA to a memory region with this attribute + * forces all pending DMA writes to complete. */ #define DMA_ATTR_WRITE_BARRIER (1UL << 0) +/* + * DMA_ATTR_WEAK_ORDERING: Specifies that reads and writes to the mapping + * may be weakly ordered, that is that reads and writes may pass each other. + */ #define DMA_ATTR_WEAK_ORDERING (1UL << 1) +/* + * DMA_ATTR_WRITE_COMBINE: Specifies that writes to the mapping may be + * buffered to improve performance. + */ #define DMA_ATTR_WRITE_COMBINE (1UL << 2) +/* + * DMA_ATTR_NON_CONSISTENT: Lets the platform to choose to return either + * consistent or non-consistent memory as it sees fit. + */ #define DMA_ATTR_NON_CONSISTENT (1UL << 3) +/* + * DMA_ATTR_NO_KERNEL_MAPPING: Lets the platform to avoid creating a kernel + * virtual mapping for the allocated buffer. + */ #define DMA_ATTR_NO_KERNEL_MAPPING (1UL << 4) +/* + * DMA_ATTR_SKIP_CPU_SYNC: Allows platform code to skip synchronization of + * the CPU cache for the given buffer assuming that it has been already + * transferred to 'device' domain. + */ #define DMA_ATTR_SKIP_CPU_SYNC (1UL << 5) +/* + * DMA_ATTR_FORCE_CONTIGUOUS: Forces contiguous allocation of the buffer + * in physical memory. + */ #define DMA_ATTR_FORCE_CONTIGUOUS (1UL << 6) +/* + * DMA_ATTR_ALLOC_SINGLE_PAGES: This is a hint to the DMA-mapping subsystem + * that it's probably not worth the time to try to allocate memory to in a way + * that gives better TLB efficiency. + */ #define DMA_ATTR_ALLOC_SINGLE_PAGES (1UL << 7) /* -- 1.9.1