<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-obmc-linux/kernel/dma, branch dev-5.0-raptor-04-16-2019</title>
<subtitle>Blackbird™ Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/blackbird-obmc-linux/atom?h=dev-5.0-raptor-04-16-2019</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-obmc-linux/atom?h=dev-5.0-raptor-04-16-2019'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/'/>
<updated>2019-03-23T19:11:26+00:00</updated>
<entry>
<title>swiotlb: Add is_swiotlb_active() function</title>
<updated>2019-03-23T19:11:26+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2019-02-07T11:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=4e9f8e86d6c781a5098e46b175355f6109a46d72'/>
<id>urn:sha1:4e9f8e86d6c781a5098e46b175355f6109a46d72</id>
<content type='text'>
commit 492366f7b4237257ef50ca9c431a6a0d50225aca upstream.

This function will be used from dma_direct code to determine
the maximum segment size of a dma mapping.

Cc: stable@vger.kernel.org
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>swiotlb: Introduce swiotlb_max_mapping_size()</title>
<updated>2019-03-23T19:11:26+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2019-02-07T11:59:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=a4eeaa9cc9dadd79369e91b9f8220c4aa0d77098'/>
<id>urn:sha1:a4eeaa9cc9dadd79369e91b9f8220c4aa0d77098</id>
<content type='text'>
commit abe420bfae528c92bd8cc5ecb62dc95672b1fd6f upstream.

The function returns the maximum size that can be remapped
by the SWIOTLB implementation. This function will be later
exposed to users through the DMA-API.

Cc: stable@vger.kernel.org
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dma: Introduce dma_max_mapping_size()</title>
<updated>2019-03-23T19:11:26+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>jroedel@suse.de</email>
</author>
<published>2019-02-07T11:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=38c3a86a8226ac78b1fd10b4dd7912530bcd3c9c'/>
<id>urn:sha1:38c3a86a8226ac78b1fd10b4dd7912530bcd3c9c</id>
<content type='text'>
commit 133d624b1cee16906134e92d5befb843b58bcf31 upstream.

The function returns the maximum size that can be mapped
using DMA-API functions. The patch also adds the
implementation for direct DMA and a new dma_map_ops pointer
so that other implementations can expose their limit.

Cc: stable@vger.kernel.org
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>swiotlb: clear io_tlb_start and io_tlb_end in swiotlb_exit</title>
<updated>2019-01-16T14:59:17+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-01-14T20:14:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=227a76b64718888c1687cc237463aa000ae6fb2b'/>
<id>urn:sha1:227a76b64718888c1687cc237463aa000ae6fb2b</id>
<content type='text'>
Otherwise is_swiotlb_buffer will return false positives when
we first initialize a swiotlb buffer, but then free it because
we have an IOMMU available.

Fixes: 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code")
Reported-by: Sibren Vasse &lt;sibren@sibrenvasse.nl&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Sibren Vasse &lt;sibren@sibrenvasse.nl&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING for remapped allocations</title>
<updated>2019-01-05T07:28:29+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-01-04T17:31:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=8270f3a11ceef64bdb0ab141180e8d2f17c619ec'/>
<id>urn:sha1:8270f3a11ceef64bdb0ab141180e8d2f17c619ec</id>
<content type='text'>
We need to return a dma_addr_t even if we don't have a kernel mapping.
Do so by consolidating the phys_to_dma call in a single place and jump
to it from all the branches that return successfully.

Fixes: bfd56cd60521 ("dma-mapping: support highmem in the generic remap allocator")
Reported-by: Liviu Dudau &lt;liviu@dudau.co.uk
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Liviu Dudau &lt;liviu@dudau.co.uk&gt;
</content>
</entry>
<entry>
<title>dma-mapping: remove a few unused exports</title>
<updated>2019-01-04T08:03:17+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-01-01T16:14:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=48e638fb68be8fecdca0611beff53a9c947704e3'/>
<id>urn:sha1:48e638fb68be8fecdca0611beff53a9c947704e3</id>
<content type='text'>
Now that the slow path DMA API calls are implemented out of line a few
helpers only used by them don't need to be exported anymore.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: remove dmam_{declare,release}_coherent_memory</title>
<updated>2019-01-04T08:03:17+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-12-26T06:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=4788ba5792cc1368ba4867e1488dc168b4fe97b7'/>
<id>urn:sha1:4788ba5792cc1368ba4867e1488dc168b4fe97b7</id>
<content type='text'>
These functions have never been used.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: implement dmam_alloc_coherent using dmam_alloc_attrs</title>
<updated>2019-01-04T08:03:16+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-12-25T16:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=d7076f07840851bbe57cb21ba052d6a4a9b1efa9'/>
<id>urn:sha1:d7076f07840851bbe57cb21ba052d6a4a9b1efa9</id>
<content type='text'>
dmam_alloc_coherent is just the default no-flags case of
dmam_alloc_attrs, so take advantage of this similar to the non-managed
version.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-mapping: implement dma_map_single_attrs using dma_map_page_attrs</title>
<updated>2019-01-04T08:02:17+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2018-12-25T07:50:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=2e05ea5cdc1ac55d9ef678ed5ea6c38acf7fd2a3'/>
<id>urn:sha1:2e05ea5cdc1ac55d9ef678ed5ea6c38acf7fd2a3</id>
<content type='text'>
And also switch the way we implement the unmap side around to stay
consistent.  This ensures dma-debug works again because it records which
function we used for mapping to ensure it is also used for unmapping,
and also reduces further code duplication.  Last but not least this
also officially allows calling dma_sync_single_* for mappings created
using dma_map_page, which is perfectly fine given that the sync calls
only take a dma_addr_t, but not a virtual address or struct page.

Fixes: 7f0fee242e ("dma-mapping: merge dma_unmap_page_attrs and dma_unmap_single_attrs")
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping</title>
<updated>2018-12-28T22:12:21+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-12-28T22:12:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=af7ddd8a627c62a835524b3f5b471edbbbcce025'/>
<id>urn:sha1:af7ddd8a627c62a835524b3f5b471edbbbcce025</id>
<content type='text'>
Pull DMA mapping updates from Christoph Hellwig:
 "A huge update this time, but a lot of that is just consolidating or
  removing code:

   - provide a common DMA_MAPPING_ERROR definition and avoid indirect
     calls for dma_map_* error checking

   - use direct calls for the DMA direct mapping case, avoiding huge
     retpoline overhead for high performance workloads

   - merge the swiotlb dma_map_ops into dma-direct

   - provide a generic remapping DMA consistent allocator for
     architectures that have devices that perform DMA that is not cache
     coherent. Based on the existing arm64 implementation and also used
     for csky now.

   - improve the dma-debug infrastructure, including dynamic allocation
     of entries (Robin Murphy)

   - default to providing chaining scatterlist everywhere, with opt-outs
     for the few architectures (alpha, parisc, most arm32 variants) that
     can't cope with it

   - misc sparc32 dma-related cleanups

   - remove the dma_mark_clean arch hook used by swiotlb on ia64 and
     replace it with the generic noncoherent infrastructure

   - fix the return type of dma_set_max_seg_size (Niklas Söderlund)

   - move the dummy dma ops for not DMA capable devices from arm64 to
     common code (Robin Murphy)

   - ensure dma_alloc_coherent returns zeroed memory to avoid kernel
     data leaks through userspace. We already did this for most common
     architectures, but this ensures we do it everywhere.
     dma_zalloc_coherent has been deprecated and can hopefully be
     removed after -rc1 with a coccinelle script"

* tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping: (73 commits)
  dma-mapping: fix inverted logic in dma_supported
  dma-mapping: deprecate dma_zalloc_coherent
  dma-mapping: zero memory returned from dma_alloc_*
  sparc/iommu: fix -&gt;map_sg return value
  sparc/io-unit: fix -&gt;map_sg return value
  arm64: default to the direct mapping in get_arch_dma_ops
  PCI: Remove unused attr variable in pci_dma_configure
  ia64: only select ARCH_HAS_DMA_COHERENT_TO_PFN if swiotlb is enabled
  dma-mapping: bypass indirect calls for dma-direct
  vmd: use the proper dma_* APIs instead of direct methods calls
  dma-direct: merge swiotlb_dma_ops into the dma_direct code
  dma-direct: use dma_direct_map_page to implement dma_direct_map_sg
  dma-direct: improve addressability error reporting
  swiotlb: remove dma_mark_clean
  swiotlb: remove SWIOTLB_MAP_ERROR
  ACPI / scan: Refactor _CCA enforcement
  dma-mapping: factor out dummy DMA ops
  dma-mapping: always build the direct mapping code
  dma-mapping: move dma_cache_sync out of line
  dma-mapping: move various slow path functions out of line
  ...
</content>
</entry>
</feed>
