]> git.baikalelectronics.ru Git - kernel.git/commit
arch/sh: make the DMA mapping operations observe dev->dma_pfn_offset
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 4 Dec 2017 15:09:01 +0000 (16:09 +0100)
committerRich Felker <dalias@libc.org>
Thu, 12 Apr 2018 23:47:53 +0000 (19:47 -0400)
commit5ee5dcee51cf8a4f285782afd1729e2d498a427a
tree6d0733fa5f58aead4d68ffbdd846038cbd306ff1
parent19f27e7f89db1e0329ed63bd90393c319a80341f
arch/sh: make the DMA mapping operations observe dev->dma_pfn_offset

Some devices may have a non-zero DMA offset, i.e an offset between the
DMA address and the physical address. Such an offset can be encoded
into the dma_pfn_offset field of "struct device", but the SuperH
implementation of the DMA mapping API does not observe this
information.

This commit fixes that by ensuring the DMA address is properly
calculated depending on this DMA offset.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Rich Felker <dalias@libc.org>
arch/sh/kernel/dma-nommu.c
arch/sh/mm/consistent.c