OSDN Git Service

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)
commitce88313069c36eef80f21fd7403f16620ecd21a2
tree6d0733fa5f58aead4d68ffbdd846038cbd306ff1
parentbc05aa6e13a717e1abff6f863f7ba82b14556df4
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