]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
dma-mapping: fix handling of dma-ranges for reserved memory (again)
authorVladimir Murzin <vladimir.murzin@arm.com>
Wed, 30 Oct 2019 10:13:13 +0000 (10:13 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 05:05:10 +0000 (00:05 -0500)
commitdd4b21cb5eeb7d16a3f1e898f3dd08d2c9b866a7
treeb8230f4f7e31e941a12ba9c2482bae961cbc98b6
parent5d14acaa5c9304cecaf2943e99d7e08f5188667d
dma-mapping: fix handling of dma-ranges for reserved memory (again)

BugLink: https://bugs.launchpad.net/bugs/1860816
[ Upstream commit a445e940ea686fc60475564009821010eb213be3 ]

Daniele reported that issue previously fixed in c41f9ea998f3
("drivers: dma-coherent: Account dma_pfn_offset when used with device
tree") reappear shortly after 43fc509c3efb ("dma-coherent: introduce
interface for default DMA pool") where fix was accidentally dropped.

Lets put fix back in place and respect dma-ranges for reserved memory.

Fixes: 43fc509c3efb ("dma-coherent: introduce interface for default DMA pool")
Reported-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com>
Tested-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com>
Tested-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm/mm/dma-mapping-nommu.c
include/linux/dma-mapping.h
kernel/dma/coherent.c