From: Petr Tesarik <ptesarik@suse.com>
To: Jonathan Corbet <corbet@lwn.net>,
Randy Dunlap <rdunlap@infradead.org>,
Robin Murphy <robin.murphy@arm.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Bagas Sanjaya <bagasdotme@gmail.com>,
linux-doc@vger.kernel.org (open list:DOCUMENTATION),
linux-kernel@vger.kernel.org (open list),
linux-mm@kvack.org (open list:MEMORY MANAGEMENT),
Petr Tesarik <ptesarik@suse.com>
Subject: [PATCH v2 3/8] docs: dma-api: remove remnants of PCI DMA API
Date: Fri, 27 Jun 2025 12:10:10 +0200 [thread overview]
Message-ID: <20250627101015.1600042-4-ptesarik@suse.com> (raw)
In-Reply-To: <20250627101015.1600042-1-ptesarik@suse.com>
The wording sometimes suggests there are multiple functions for an
operation. This was in fact the case before PCI DMA API was removed, but
since there is only one API now, the documentation has become confusing.
To improve readability:
* Remove implicit references to the PCI DMA API (plurals, use of "both",
etc.)
* Where possible, refer to an actual function rather than a more generic
description of the operation.
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
Documentation/core-api/dma-api.rst | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/Documentation/core-api/dma-api.rst b/Documentation/core-api/dma-api.rst
index c0a2cc7d0b959..3e89e3b0ecfd2 100644
--- a/Documentation/core-api/dma-api.rst
+++ b/Documentation/core-api/dma-api.rst
@@ -53,10 +53,9 @@ minimum allocation length may be as big as a page, so you should
consolidate your requests for coherent memory as much as possible.
The simplest way to do that is to use the dma_pool calls (see below).
-The flag parameter (dma_alloc_coherent() only) allows the caller to
-specify the ``GFP_`` flags (see kmalloc()) for the allocation (the
-implementation may choose to ignore flags that affect the location of
-the returned memory, like GFP_DMA).
+The flag parameter allows the caller to specify the ``GFP_`` flags (see
+kmalloc()) for the allocation (the implementation may ignore flags that affect
+the location of the returned memory, like GFP_DMA).
::
@@ -64,13 +63,12 @@ the returned memory, like GFP_DMA).
dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t dma_handle)
-Free a region of coherent memory you previously allocated. dev,
-size and dma_handle must all be the same as those passed into
-dma_alloc_coherent(). cpu_addr must be the virtual address returned by
-the dma_alloc_coherent().
+Free a previously allocated region of coherent memory. dev, size and dma_handle
+must all be the same as those passed into dma_alloc_coherent(). cpu_addr must
+be the virtual address returned by dma_alloc_coherent().
-Note that unlike their sibling allocation calls, these routines
-may only be called with IRQs enabled.
+Note that unlike the sibling allocation call, this routine may only be called
+with IRQs enabled.
Part Ib - Using small DMA-coherent buffers
@@ -246,9 +244,7 @@ Part Id - Streaming DMA mappings
Maps a piece of processor virtual memory so it can be accessed by the
device and returns the DMA address of the memory.
-The direction for both APIs may be converted freely by casting.
-However the DMA API uses a strongly typed enumerator for its
-direction:
+The DMA API uses a strongly typed enumerator for its direction:
======================= =============================================
DMA_NONE no direction (used for debugging)
@@ -325,8 +321,7 @@ DMA_BIDIRECTIONAL direction isn't known
enum dma_data_direction direction)
Unmaps the region previously mapped. All the parameters passed in
-must be identical to those passed in (and returned) by the mapping
-API.
+must be identical to those passed to (and returned by) dma_map_single().
::
--
2.49.0
next prev parent reply other threads:[~2025-06-27 10:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250627101022eucas1p2f3715c9c9439ca986217e380d4d3e254@eucas1p2.samsung.com>
2025-06-27 10:10 ` [PATCH v2 0/8] update DMA API documentation Petr Tesarik
2025-06-27 10:10 ` [PATCH v2 1/8] docs: dma-api: use "DMA API" consistently throughout the document Petr Tesarik
2025-06-28 18:56 ` Randy Dunlap
2025-06-27 10:10 ` [PATCH v2 2/8] docs: dma-api: replace consistent with coherent Petr Tesarik
2025-06-28 18:57 ` Randy Dunlap
2025-06-27 10:10 ` Petr Tesarik [this message]
2025-06-28 18:58 ` [PATCH v2 3/8] docs: dma-api: remove remnants of PCI DMA API Randy Dunlap
2025-06-27 10:10 ` [PATCH v2 4/8] docs: dma-api: add a kernel-doc comment for dma_pool_zalloc() Petr Tesarik
2025-06-28 19:04 ` Randy Dunlap
2025-07-01 11:38 ` Petr Tesarik
2025-07-01 12:54 ` Jonathan Corbet
2025-07-01 15:46 ` Petr Tesarik
2025-06-27 10:10 ` [PATCH v2 5/8] docs: dma-api: remove duplicate description of the DMA pool API Petr Tesarik
2025-06-28 19:01 ` Randy Dunlap
2025-06-27 10:10 ` [PATCH v2 6/8] docs: dma-api: clarify DMA addressing limitations Petr Tesarik
2025-06-28 18:58 ` Randy Dunlap
2025-06-27 10:10 ` [PATCH v2 7/8] docs: dma-api: update streaming DMA physical address constraints Petr Tesarik
2025-06-28 18:59 ` Randy Dunlap
2025-06-30 1:32 ` Bagas Sanjaya
2025-06-27 10:10 ` [PATCH v2 8/8] docs: dma-api: clean up documentation of dma_map_sg() Petr Tesarik
2025-06-28 19:00 ` Randy Dunlap
2025-06-27 17:03 ` [PATCH v2 0/8] update DMA API documentation Marek Szyprowski
2025-07-01 19:53 ` Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250627101015.1600042-4-ptesarik@suse.com \
--to=ptesarik@suse.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bagasdotme@gmail.com \
--cc=corbet@lwn.net \
--cc=kbusch@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=rdunlap@infradead.org \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox