]> 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)
commitd31d75073764d5aa660200113a93bd4f776f5915
tree6d0733fa5f58aead4d68ffbdd846038cbd306ff1
parent6c1e7645f71562cc1d7aff6ea8be90b453a659ab
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