<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/Documentation/DMA-API.txt, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-20T07:14:09Z</updated>
<entry>
<title>dma-mapping: deprecate dma_zalloc_coherent</title>
<updated>2018-12-20T07:14:09Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-12-14T08:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=06d4dd2f2ce1cdb625f77c0676d5af6ba310c01d'/>
<id>urn:sha1:06d4dd2f2ce1cdb625f77c0676d5af6ba310c01d</id>
<content type='text'>
We now always return zeroed memory from dma_alloc_coherent.  Note that
simply passing GFP_ZERO to dma_alloc_coherent wasn't always doing the
right thing to start with given that various allocators are not backed
by the page allocator and thus would ignore GFP_ZERO.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-debug: Batch dma_debug_entry allocation</title>
<updated>2018-12-11T13:32:13Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2018-12-10T14:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad78dee0b630527bdfed809d1f5ed95c601886ae'/>
<id>urn:sha1:ad78dee0b630527bdfed809d1f5ed95c601886ae</id>
<content type='text'>
DMA debug entries are one of those things which aren't that useful
individually - we will always want some larger quantity of them - and
which we don't really need to manage the exact number of - we only care
about having 'enough'. In that regard, the current behaviour of creating
them one-by-one leads to a lot of unwarranted function call overhead and
memory wasted on alignment padding.

Now that we don't have to worry about freeing anything via
dma_debug_resize_entries(), we can optimise the allocation behaviour by
grabbing whole pages at once, which will save considerably on the
aforementioned overheads, and probably offer a little more cache/TLB
locality benefit for traversing the lists under normal operation. This
should also give even less reason for an architecture-level override of
the preallocation size, so make the definition unconditional - if there
is still any desire to change the compile-time value for some platforms
it would be better off as a Kconfig option anyway.

Since freeing a whole page of entries at once becomes enough of a
challenge that it's not really worth complicating dma_debug_init(), we
may as well tweak the preallocation behaviour such that as long as we
manage to allocate *some* pages, we can leave debugging enabled on a
best-effort basis rather than otherwise wasting them.

Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Tested-by: Qian Cai &lt;cai@lca.pw&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-debug: Make leak-like behaviour apparent</title>
<updated>2018-12-11T13:31:18Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2018-12-10T14:00:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ceb51173b2b5bd7af0d99079f6bbacdcfc58fe08'/>
<id>urn:sha1:ceb51173b2b5bd7af0d99079f6bbacdcfc58fe08</id>
<content type='text'>
Now that we can dynamically allocate DMA debug entries to cope with
drivers maintaining excessively large numbers of live mappings, a driver
which *does* actually have a bug leaking mappings (and is not unloaded)
will no longer trigger the "DMA-API: debugging out of memory - disabling"
message until it gets to actual kernel OOM conditions, which means it
could go unnoticed for a while. To that end, let's inform the user each
time the pool has grown to a multiple of its initial size, which should
make it apparent that they either have a leak or might want to increase
the preallocation size.

Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Tested-by: Qian Cai &lt;cai@lca.pw&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-debug: Dynamically expand the dma_debug_entry pool</title>
<updated>2018-12-11T13:31:17Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2018-12-10T14:00:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b9d9ac02b9d8d32c515c82bb17401c429f160ab'/>
<id>urn:sha1:2b9d9ac02b9d8d32c515c82bb17401c429f160ab</id>
<content type='text'>
Certain drivers such as large multi-queue network adapters can use pools
of mapped DMA buffers larger than the default dma_debug_entry pool of
65536 entries, with the result that merely probing such a device can
cause DMA debug to disable itself during boot unless explicitly given an
appropriate "dma_debug_entries=..." option.

Developers trying to debug some other driver on such a system may not be
immediately aware of this, and at worst it can hide bugs if they fail to
realise that dma-debug has already disabled itself unexpectedly by the
time their code of interest gets to run. Even once they do realise, it
can be a bit of a pain to emprirically determine a suitable number of
preallocated entries to configure, short of massively over-allocating.

There's really no need for such a static limit, though, since we can
quite easily expand the pool at runtime in those rare cases that the
preallocated entries are insufficient, which is arguably the least
surprising and most useful behaviour. To that end, refactor the
prealloc_memory() logic a little bit to generalise it for runtime
reallocations as well.

Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Tested-by: Qian Cai &lt;cai@lca.pw&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-debug: Expose nr_total_entries in debugfs</title>
<updated>2018-12-11T13:31:17Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2018-12-10T14:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f191555ba4ba8fc82e589670e46a7f79b72a157'/>
<id>urn:sha1:9f191555ba4ba8fc82e589670e46a7f79b72a157</id>
<content type='text'>
Expose nr_total_entries in debugfs, so that {num,min}_free_entries
become even more meaningful to users interested in current/maximum
utilisation. This becomes even more relevant once nr_total_entries
may change at runtime beyond just the existing AMD GART debug code.

Suggested-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Tested-by: Qian Cai &lt;cai@lca.pw&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags</title>
<updated>2017-09-01T09:59:17Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-08-25T15:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2436bdcda53ff4abb7897c87fa29ef3de8055344'/>
<id>urn:sha1:2436bdcda53ff4abb7897c87fa29ef3de8055344</id>
<content type='text'>
DMA_MEMORY_IO was never used in the tree, so remove it.  That means there is
no need for the DMA_MEMORY_MAP flag either now, so remove it as well and
change dma_declare_coherent_memory to return a normal errno value.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
 Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
</content>
</entry>
<entry>
<title>dma-coherent: remove the DMA_MEMORY_INCLUDES_CHILDREN flag</title>
<updated>2017-09-01T07:50:39Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-08-25T15:12:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b32dbc1e0bf0eaa8bdd725491b361d5fc2f57a85'/>
<id>urn:sha1:b32dbc1e0bf0eaa8bdd725491b361d5fc2f57a85</id>
<content type='text'>
This flag was never implemented or used.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: remove dma_alloc_noncoherent and dma_free_noncoherent</title>
<updated>2017-08-29T08:04:02Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-08-25T15:06:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fd523c57e520899e05ec663d04743005bcef5b2'/>
<id>urn:sha1:2fd523c57e520899e05ec663d04743005bcef5b2</id>
<content type='text'>
No users left, everyone switched to the _attrs versions.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>DMA-API.txt: standardize document format</title>
<updated>2017-07-14T19:51:32Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab@s-opensource.com</email>
</author>
<published>2017-05-14T10:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03158a70adde2fd46b0f266b5d1090efe2ff6887'/>
<id>urn:sha1:03158a70adde2fd46b0f266b5d1090efe2ff6887</id>
<content type='text'>
Each text file under Documentation follows a different
format. Some doesn't even have titles!

Change its representation to follow the adopted standard,
using ReST markups for it to be parseable by Sphinx:

- Fix some title marks to match ReST;
- use :Author: for author name;
- foo_ is an hyperlink. Get rid of it;
- Mark literal blocks as such;
- Use tables on some places that are almost using the
  table format.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@s-opensource.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation: DMA API: fix a typo in a function name</title>
<updated>2017-06-05T21:57:02Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2017-05-27T18:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a08d83e4324fcb23994dfd481acedf49e37cc06'/>
<id>urn:sha1:6a08d83e4324fcb23994dfd481acedf49e37cc06</id>
<content type='text'>
Correct the typo, the wrongly typed function does not exist.

Fixes: 6c9c6d6301287e ("dma-debug: New interfaces to debug dma mapping errors")
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
</feed>
