<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/dma/Kconfig, branch v5.8</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.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-06-23T12:13:58Z</updated>
<entry>
<title>dma-mapping: DMA_COHERENT_POOL should select GENERIC_ALLOCATOR</title>
<updated>2020-06-23T12:13:58Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-06-18T15:23:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d07ae4c486908615ab336b987c7c367d132fd844'/>
<id>urn:sha1:d07ae4c486908615ab336b987c7c367d132fd844</id>
<content type='text'>
The dma coherent pool code needs genalloc.  Move the select over
from DMA_REMAP, which doesn't actually need it.

Fixes: dbed452a078d ("dma-pool: decouple DMA_REMAP from DMA_COHERENT_POOL")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
</content>
</entry>
<entry>
<title>dma-direct: re-enable mmap for !CONFIG_MMU</title>
<updated>2020-06-17T07:29:31Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-06-10T08:29:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1fbf57d0530217b9f264eedc4867bf91479cdf3c'/>
<id>urn:sha1:1fbf57d0530217b9f264eedc4867bf91479cdf3c</id>
<content type='text'>
nommu configfs can trivially map the coherent allocations to user space,
as no actual page table setup is required and the kernel and the user
space programs share the same address space.

Fixes: 62fcee9a3bd7 ("dma-mapping: remove CONFIG_ARCH_NO_COHERENT_DMA_MMAP")
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: dillon min &lt;dillon.minfei@gmail.com&gt;
Reviewed-by: Vladimir Murzin &lt;vladimir.murzin@arm.com&gt;
Tested-by: dillon min &lt;dillon.minfei@gmail.com&gt;
</content>
</entry>
<entry>
<title>dma-pool: decouple DMA_REMAP from DMA_COHERENT_POOL</title>
<updated>2020-06-15T06:35:30Z</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2020-06-11T07:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbed452a078d56bc7f1abecc3edd6a75e8e4484e'/>
<id>urn:sha1:dbed452a078d56bc7f1abecc3edd6a75e8e4484e</id>
<content type='text'>
DMA_REMAP is an unnecessary requirement for AMD SEV, which requires
DMA_COHERENT_POOL, so avoid selecting it when it is otherwise unnecessary.

The only other requirement for DMA coherent pools is DMA_DIRECT_REMAP, so
ensure that properly selects the config option when needed.

Fixes: 82fef0ad811f ("x86/mm: unencrypted non-blocking DMA allocations use coherent pools")
Reported-by: Alex Xu (Hello71) &lt;alex_y_xu@yahoo.ca&gt;
Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Tested-by: Alex Xu (Hello71) &lt;alex_y_xu@yahoo.ca&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-remap: separate DMA atomic pools from direct remap code</title>
<updated>2020-04-20T10:08:45Z</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2020-04-15T00:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e860c299ac0d738b44ff91693f11e63080a29698'/>
<id>urn:sha1:e860c299ac0d738b44ff91693f11e63080a29698</id>
<content type='text'>
DMA atomic pools will be needed beyond only CONFIG_DMA_DIRECT_REMAP so
separate them out into their own file.

This also adds a new Kconfig option that can be subsequently used for
options, such as CONFIG_AMD_MEM_ENCRYPT, that will utilize the coherent
pools but do not have a dependency on direct remapping.

For this patch alone, there is no functional change introduced.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
[hch: fixup copyrights and remove unused includes]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>dma-direct: provide mmap and get_sgtable method overrides</title>
<updated>2019-11-11T09:52:15Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-10-29T10:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34dc0ea6bc960f1f57b2148f01a3f4da23f87013'/>
<id>urn:sha1:34dc0ea6bc960f1f57b2148f01a3f4da23f87013</id>
<content type='text'>
For dma-direct we know that the DMA address is an encoding of the
physical address that we can trivially decode.  Use that fact to
provide implementations that do not need the arch_dma_coherent_to_pfn
architecture hook.  Note that we still can only support mmap of
non-coherent memory only if the architecture provides a way to set an
uncached bit in the page tables.  This must be true for architectures
that use the generic remap helpers, but other architectures can also
manually select it.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
</content>
</entry>
<entry>
<title>dma-mapping: remove arch_dma_mmap_pgprot</title>
<updated>2019-08-29T14:43:22Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-08-26T07:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=419e2f1838819e954071dfa1d1f820ab3386ada1'/>
<id>urn:sha1:419e2f1838819e954071dfa1d1f820ab3386ada1</id>
<content type='text'>
arch_dma_mmap_pgprot is used for two things:

 1) to override the "normal" uncached page attributes for mapping
    memory coherent to devices that can't snoop the CPU caches
 2) to provide the special DMA_ATTR_WRITE_COMBINE semantics on older
    arm systems and some mips platforms

Replace one with the pgprot_dmacoherent macro that is already provided
by arm and much simpler to use, and lift the DMA_ATTR_WRITE_COMBINE
handling to common code with an explicit arch opt-in.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;	# m68k
Acked-by: Paul Burton &lt;paul.burton@mips.com&gt;		# mips
</content>
</entry>
<entry>
<title>dma-direct: Force unencrypted DMA under SME for certain DMA masks</title>
<updated>2019-07-16T20:15:46Z</updated>
<author>
<name>Tom Lendacky</name>
<email>thomas.lendacky@amd.com</email>
</author>
<published>2019-07-10T19:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9087c37584fb7d8315877bb55f85e4268cc0b4f4'/>
<id>urn:sha1:9087c37584fb7d8315877bb55f85e4268cc0b4f4</id>
<content type='text'>
If a device doesn't support DMA to a physical address that includes the
encryption bit (currently bit 47, so 48-bit DMA), then the DMA must
occur to unencrypted memory. SWIOTLB is used to satisfy that requirement
if an IOMMU is not active (enabled or configured in passthrough mode).

However, commit fafadcd16595 ("swiotlb: don't dip into swiotlb pool for
coherent allocations") modified the coherent allocation support in
SWIOTLB to use the DMA direct coherent allocation support. When an IOMMU
is not active, this resulted in dma_alloc_coherent() failing for devices
that didn't support DMA addresses that included the encryption bit.

Addressing this requires changes to the force_dma_unencrypted() function
in kernel/dma/direct.c. Since the function is now non-trivial and
SME/SEV specific, update the DMA direct support to add an arch override
for the force_dma_unencrypted() function. The arch override is selected
when CONFIG_AMD_MEM_ENCRYPT is set. The arch override function resides in
the arch/x86/mm/mem_encrypt.c file and forces unencrypted DMA when either
SEV is active or SME is active and the device does not support DMA to
physical addresses that include the encryption bit.

Fixes: fafadcd16595 ("swiotlb: don't dip into swiotlb pool for coherent allocations")
Suggested-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Tom Lendacky &lt;thomas.lendacky@amd.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
[hch: moved the force_dma_unencrypted declaration to dma-mapping.h,
      fold the s390 fix from Halil Pasic]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier - Makefile/Kconfig</title>
<updated>2019-05-21T08:50:46Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:07:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1'/>
<id>urn:sha1:ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1</id>
<content type='text'>
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dma-mapping: add a Kconfig symbol to indicate arch_dma_prep_coherent presence</title>
<updated>2019-05-06T13:04:40Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2019-03-25T14:44:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=13bf5ced93775ffccb53527a9d862e023a9daa03'/>
<id>urn:sha1:13bf5ced93775ffccb53527a9d862e023a9daa03</id>
<content type='text'>
Add a Kconfig symbol that indicates an architecture provides a
arch_dma_prep_coherent implementation, and provide a stub otherwise.

This will allow the generic dma-iommu code to use it while still
allowing to be built for cache coherent architectures.

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: select GENERIC_ALLOCATOR for DMA_REMAP</title>
<updated>2019-04-08T15:51:22Z</updated>
<author>
<name>Clément Leger</name>
<email>cleger@kalray.eu</email>
</author>
<published>2019-03-27T13:06:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c13edf8106f6ad1edb9b7e011351fbaf83ceb992'/>
<id>urn:sha1:c13edf8106f6ad1edb9b7e011351fbaf83ceb992</id>
<content type='text'>
When DMA_REMAP is enabled, code in remap.c needs generic allocator.
It currently worked since few architectures uses it (arm64, csky) and
they both select GENERIC_ALLOCATOR. Select it when using DMA_REMAP
to have correct dependencies.

Signed-off-by: Clement Leger &lt;clement.leger@kalray.eu&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
