<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/dma-mapping.h, branch v4.19.29</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.29</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.19.29'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-07-25T11:32:58Z</updated>
<entry>
<title>dma-mapping: relax warning for per-device areas</title>
<updated>2018-07-25T11:32:58Z</updated>
<author>
<name>Robin Murphy</name>
<email>robin.murphy@arm.com</email>
</author>
<published>2018-07-23T21:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d27fb99f62af7b79c542d161aa5155ed57271ddc'/>
<id>urn:sha1:d27fb99f62af7b79c542d161aa5155ed57271ddc</id>
<content type='text'>
The reasons why dma_free_attrs() should not be called from IRQ context
are not necessarily obvious and somewhat buried in the development
history, so let's start by documenting the warning itself to help anyone
who does happen to hit it and wonder what the deal is.

However, this check turns out to be slightly over-restrictive for the
way that per-device memory has been spliced into the general API, since
for that case we know that dma_declare_coherent_memory() has created an
appropriate CPU mapping for the entire area and nothing dynamic should
be happening. Given that the usage model for per-device memory is often
more akin to streaming DMA than 'real' coherent DMA (e.g. allocating and
freeing space to copy short-lived packets in and out), it is also
somewhat more reasonable for those operations to happen in IRQ handlers
for such devices.

Therefore, let's move the irqs_disabled() check down past the per-device
area hook, so that that gets a chance to resolve the request before we
reach definite "you're doing it wrong" territory.

Reported-by: Fredrik Noring &lt;noring@nocrew.org&gt;
Tested-by: Fredrik Noring &lt;noring@nocrew.org&gt;
Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>x86/pci-dma: switch the VIA 32-bit DMA quirk to use the struct device flag</title>
<updated>2018-05-28T10:48:25Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-05-28T10:47:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0ead51c3fbd15a4bc91e984f1b18b5c9422fbb02'/>
<id>urn:sha1:0ead51c3fbd15a4bc91e984f1b18b5c9422fbb02</id>
<content type='text'>
Instead of globally disabling &gt; 32bit DMA using the arch_dma_supported
hook walk the PCI bus under the actually affected bridge and mark every
device with the dma_32bit_limit flag.  This also gets rid of the
arch_dma_supported hook entirely.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: remove unused gfp_t parameter to arch_dma_alloc_attrs</title>
<updated>2018-05-25T09:23:06Z</updated>
<author>
<name>Huaisheng Ye</name>
<email>yehs1@lenovo.com</email>
</author>
<published>2018-05-25T05:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=884571f0de7b02bb784be3a5c870eabce62cdaeb'/>
<id>urn:sha1:884571f0de7b02bb784be3a5c870eabce62cdaeb</id>
<content type='text'>
Signed-off-by: Huaisheng Ye &lt;yehs1@lenovo.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: provide a generic dma-noncoherent implementation</title>
<updated>2018-05-19T06:46:12Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-04-16T13:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=782e6769c0df744e773dc2acff71c974b3bba4e9'/>
<id>urn:sha1:782e6769c0df744e773dc2acff71c974b3bba4e9</id>
<content type='text'>
Add a new dma_map_ops implementation that uses dma-direct for the
address mapping of streaming mappings, and which requires arch-specific
implemenations of coherent allocate/free.

Architectures have to provide flushing helpers to ownership trasnfers
to the device and/or CPU, and can provide optional implementations of
the coherent mmap functionality, and the cache_flush routines for
non-coherent long term allocations.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Alexey Brodkin &lt;abrodkin@synopsys.com&gt;
Acked-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: move the NEED_DMA_MAP_STATE config symbol to lib/Kconfig</title>
<updated>2018-05-09T04:56:08Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-05-09T04:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f616ab59c294b6ea6efa94f6139ea3eda2f52be0'/>
<id>urn:sha1:f616ab59c294b6ea6efa94f6139ea3eda2f52be0</id>
<content type='text'>
This way we have one central definition of it, and user can select it as
needed.  Note that we now also always select it when CONFIG_DMA_API_DEBUG
is select, which fixes some incorrect checks in a few network drivers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Anshuman Khandual &lt;khandual@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>PCI: remove PCI_DMA_BUS_IS_PHYS</title>
<updated>2018-05-07T05:15:41Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-04-12T07:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=325ef1857fff8b2049322921e19421b6c5ad74e5'/>
<id>urn:sha1:325ef1857fff8b2049322921e19421b6c5ad74e5</id>
<content type='text'>
This was used by the ide, scsi and networking code in the past to
determine if they should bounce payloads.  Now that the dma mapping
always have to support dma to all physical memory (thanks to swiotlb
for non-iommu systems) there is no need to this crude hack any more.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Palmer Dabbelt &lt;palmer@sifive.com&gt; (for riscv)
Reviewed-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'dma-mapping-4.17' of git://git.infradead.org/users/hch/dma-mapping</title>
<updated>2018-04-05T17:23:24Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-04-05T17:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=652ede37cec0bf7313927ecf4cebf0e79a0619f2'/>
<id>urn:sha1:652ede37cec0bf7313927ecf4cebf0e79a0619f2</id>
<content type='text'>
Pull dma-mapping updates from Christoph Hellwig:
 "Very light this round as the interesting dma mapping changes went
  through the x86 tree.

  This just provides proper stubs for architectures not supporting dma
  (Geert Uytterhoeven)"

* tag 'dma-mapping-4.17' of git://git.infradead.org/users/hch/dma-mapping:
  usb: gadget: Add NO_DMA dummies for DMA mapping API
  scsi: Add NO_DMA dummies for SCSI DMA mapping API
  mm: Add NO_DMA dummies for DMA pool API
  dma-coherent: Add NO_DMA dummies for managed DMA API
  dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy
</content>
</entry>
<entry>
<title>dma-mapping: Don't clear GFP_ZERO in dma_alloc_attrs</title>
<updated>2018-03-28T15:34:23Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-03-28T13:35:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e89f5b37015309a8bdf0b21d08007580b92f92a4'/>
<id>urn:sha1:e89f5b37015309a8bdf0b21d08007580b92f92a4</id>
<content type='text'>
Revert the clearing of __GFP_ZERO in dma_alloc_attrs and move it to
dma_direct_alloc for now.  While most common architectures always zero dma
cohereny allocations (and x86 did so since day one) this is not documented
and at least arc and s390 do not zero without the explicit __GFP_ZERO
argument.

Fixes: 57bf5a8963f8 ("dma-mapping: clear harmful GFP_* flags in common code")
Reported-by: Evgeniy Didin &lt;Evgeniy.Didin@synopsys.com&gt;
Reported-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Evgeniy Didin &lt;Evgeniy.Didin@synopsys.com&gt;
Cc: iommu@lists.linux-foundation.org
Link: https://lkml.kernel.org/r/20180328133535.17302-2-hch@lst.de

</content>
</entry>
<entry>
<title>dma-coherent: Add NO_DMA dummies for managed DMA API</title>
<updated>2018-03-16T18:58:27Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2018-03-16T13:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ab642e952f80c66c5592f0e2c35588843a813df8'/>
<id>urn:sha1:ab642e952f80c66c5592f0e2c35588843a813df8</id>
<content type='text'>
Add dummies for dmam_{alloc,free}_coherent(), to allow compile-testing
if NO_DMA=y.

This prevents the following from showing up later:

    ERROR: "dmam_alloc_coherent" [drivers/net/ethernet/arc/arc_emac.ko] undefined!
    ERROR: "dmam_free_coherent" [drivers/net/ethernet/apm/xgene/xgene-enet.ko] undefined!
    ERROR: "dmam_alloc_coherent" [drivers/net/ethernet/apm/xgene/xgene-enet.ko] undefined!
    ERROR: "dmam_alloc_coherent" [drivers/mtd/nand/hisi504_nand.ko] undefined!
    ERROR: "dmam_alloc_coherent" [drivers/mmc/host/dw_mmc.ko] undefined!

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-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: Convert NO_DMA get_dma_ops() into a real dummy</title>
<updated>2018-03-16T18:58:27Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2018-03-16T13:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f29ab49b5388b2f829cf99859bc5f8ad8ec4d06a'/>
<id>urn:sha1:f29ab49b5388b2f829cf99859bc5f8ad8ec4d06a</id>
<content type='text'>
If NO_DMA=y, get_dma_ops() returns a reference to the
non-existing symbol bad_dma_ops, thus causing a link failure if it is
ever used.

Make get_dma_ops() return NULL instead, to avoid the link failure.
This allows to improve compile-testing, and limits the need to keep on
sprinkling dependencies on HAS_DMA all over the place.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
