From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752942AbcGMIn6 (ORCPT ); Wed, 13 Jul 2016 04:43:58 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:55532 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932231AbcGMInL (ORCPT ); Wed, 13 Jul 2016 04:43:11 -0400 X-AuditID: cbfec7f4-f796c6d000001486-1b-5785ff046551 From: Krzysztof Kozlowski To: Andrew Morton Cc: linux-kernel@vger.kernel.org, hch@infradead.org, Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH v6 46/46] dma-mapping: Document the DMA attributes next to the declaration Date: Wed, 13 Jul 2016 10:41:37 +0200 Message-id: <1468399300-5399-46-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1468399300-5399-45-git-send-email-k.kozlowski@samsung.com> References: <1468399167-28083-1-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-1-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-2-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-3-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-4-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-5-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-6-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-7-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-8-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-9-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-10-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-11-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-12-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-13-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-14-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-15-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-16-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-17-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-18-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-19-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-20-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-21-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-22-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-23-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-24-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-25-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-26-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-27-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-28-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-29-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-30-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-31-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-32-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-33-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-34-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-35-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-36-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-37-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-38-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-39-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-40-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-41-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-42-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-43-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-44-git-send-email-k.kozlowski@samsung.com> <1468399300-5399-45-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmluLIzCtJLcpLzFFi42I5/e/4VV2W/63hBufmclrMWb+GzWLjjPWs FqcnLGKyeP3C0OLyrjlsDqwem1doeZyY8ZvFo2/LKkaPz5vkAliiuGxSUnMyy1KL9O0SuDKm PLQsmC5UMe3bY6YGxp98XYycHBICJhLXn91lgbDFJC7cW8/WxcjFISSwlFFi9YrTjBBOI5PE la297CBVbALGEpuXL2EDsUUEdCVWPd/FDFLELDCHUWLrvIeMIAlhgRiJN3dPsILYLAKqEqe3 r2ECsXkF3CXeX17DCrFOTuLksclgNqeAh8SqdZeYQWwhgSViEn93x0xg5F3AyLCKUTS1NLmg OCk911CvODG3uDQvXS85P3cTIyRovuxgXHzM6hCjAAejEg8vo0hruBBrYllxZe4hRgkOZiUR 3qd/gUK8KYmVValF+fFFpTmpxYcYpTlYlMR55+56HyIkkJ5YkpqdmlqQWgSTZeLglGpgjLf9 3xnZX79646atKhGsWq5fYuJ3n3Axvlrj0/m67th7I6eCuG/pmekzz3Bu0vmRyaCw/eblOpln J27/lTv+KTZ+UYEOU/+nx5FMW/8lqBcxyf6+dHvNNcVSpnWz4lnEAwx9FnppbxC2ddfLvHZN c8appng2u8YenpqHacUdnh8S2P/N5PFRYinOSDTUYi4qTgQAL6LvxBYCAAA= 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