<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/dma/pool.c, branch v5.11</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.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-11-27T09:33:42Z</updated>
<entry>
<title>dma-pool: no need to check return value of debugfs_create functions</title>
<updated>2020-11-27T09:33:42Z</updated>
<author>
<name>Tiezhu Yang</name>
<email>yangtiezhu@loongson.cn</email>
</author>
<published>2020-11-07T10:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94035edcb4e3bbc9f445bee706722ef64e044095'/>
<id>urn:sha1:94035edcb4e3bbc9f445bee706722ef64e044095</id>
<content type='text'>
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Signed-off-by: Tiezhu Yang &lt;yangtiezhu@loongson.cn&gt;
Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: merge &lt;linux/dma-noncoherent.h&gt; into &lt;linux/dma-map-ops.h&gt;</title>
<updated>2020-10-06T05:07:06Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-09-22T13:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f4df96b8781e40d0cb0e32eb3d1f6d87375adf9'/>
<id>urn:sha1:9f4df96b8781e40d0cb0e32eb3d1f6d87375adf9</id>
<content type='text'>
Move more nitty gritty DMA implementation details into the common
internal header.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: merge &lt;linux/dma-contiguous.h&gt; into &lt;linux/dma-map-ops.h&gt;</title>
<updated>2020-10-06T05:07:04Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-09-11T08:56:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b1abd1fb7efafc25231c54a67c6fbb3d3127efd'/>
<id>urn:sha1:0b1abd1fb7efafc25231c54a67c6fbb3d3127efd</id>
<content type='text'>
Merge dma-contiguous.h into dma-map-ops.h, after removing the comment
describing the contiguous allocator into kernel/dma/contigous.c.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-direct: remove dma_direct_{alloc,free}_pages</title>
<updated>2020-09-11T07:10:29Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-08-17T15:06:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2f5388a29be82a62529d146499e70987e856f6f7'/>
<id>urn:sha1:2f5388a29be82a62529d146499e70987e856f6f7</id>
<content type='text'>
Just merge these helpers into the main dma_direct_{alloc,free} routines,
as the additional checks are always false for the two callers.

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-pool: Fix an uninitialized variable bug in atomic_pool_expand()</title>
<updated>2020-08-27T07:22:56Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-08-26T11:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=892fc9f6835ecf075efac20789b012c5c9997fcc'/>
<id>urn:sha1:892fc9f6835ecf075efac20789b012c5c9997fcc</id>
<content type='text'>
The "page" pointer can be used with out being initialized.

Fixes: d7e673ec2c8e ("dma-pool: Only allocate from CMA when in same memory zone")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-pool: Only allocate from CMA when in same memory zone</title>
<updated>2020-08-14T14:27:05Z</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenzjulienne@suse.de</email>
</author>
<published>2020-08-14T10:26:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7e673ec2c8e0ea39c4c70fc490d67d7fbda869d'/>
<id>urn:sha1:d7e673ec2c8e0ea39c4c70fc490d67d7fbda869d</id>
<content type='text'>
There is no guarantee to CMA's placement, so allocating a zone specific
atomic pool from CMA might return memory from a completely different
memory zone. To get around this double check CMA's placement before
allocating from it.

Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-pool: fix coherent pool allocations for IOMMU mappings</title>
<updated>2020-08-14T14:27:00Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-08-14T10:26:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9420139f516d7fbc248ce17f35275cb005ed98ea'/>
<id>urn:sha1:9420139f516d7fbc248ce17f35275cb005ed98ea</id>
<content type='text'>
When allocating coherent pool memory for an IOMMU mapping we don't care
about the DMA mask.  Move the guess for the initial GFP mask into the
dma_direct_alloc_pages and pass dma_coherent_ok as a function pointer
argument so that it doesn't get applied to the IOMMU case.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Amit Pundir &lt;amit.pundir@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-pool: do not allocate pool memory from CMA</title>
<updated>2020-07-14T13:46:32Z</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenzjulienne@suse.de</email>
</author>
<published>2020-07-08T16:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d9765e41d8e9ea2251bf73735a2895c8bad546fc'/>
<id>urn:sha1:d9765e41d8e9ea2251bf73735a2895c8bad546fc</id>
<content type='text'>
There is no guarantee to CMA's placement, so allocating a zone specific
atomic pool from CMA might return memory from a completely different
memory zone. So stop using it.

Fixes: c84dc6e68a1d ("dma-pool: add additional coherent pools to map to gfp mask")
Reported-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Tested-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-pool: make sure atomic pool suits device</title>
<updated>2020-07-14T13:42:33Z</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenzjulienne@suse.de</email>
</author>
<published>2020-07-14T12:39:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81e9d894e03f9a279102c7aac62ea7cbf9949f4b'/>
<id>urn:sha1:81e9d894e03f9a279102c7aac62ea7cbf9949f4b</id>
<content type='text'>
When allocating DMA memory from a pool, the core can only guess which
atomic pool will fit a device's constraints. If it doesn't, get a safer
atomic pool and try again.

Fixes: c84dc6e68a1d ("dma-pool: add additional coherent pools to map to gfp mask")
Reported-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Suggested-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-pool: introduce dma_guess_pool()</title>
<updated>2020-07-14T13:42:30Z</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenzjulienne@suse.de</email>
</author>
<published>2020-07-14T12:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48b6703858dd5526c82d8ff2dbac59acab3a9dda'/>
<id>urn:sha1:48b6703858dd5526c82d8ff2dbac59acab3a9dda</id>
<content type='text'>
dma-pool's dev_to_pool() creates the false impression that there is a
way to grantee a mapping between a device's DMA constraints and an
atomic pool. It tuns out it's just a guess, and the device might need to
use an atomic pool containing memory from a 'safer' (or lower) memory
zone.

To help mitigate this, introduce dma_guess_pool() which can be fed a
device's DMA constraints and atomic pools already known to be faulty, in
order for it to provide an better guess on which pool to use.

Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
