]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc: Ensure that swiotlb buffer is allocated from low memory
authorMike Rapoport <rppt@linux.ibm.com>
Wed, 4 Dec 2019 12:35:24 +0000 (14:35 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit754f655340923a41fbabae44e05cf6f204bda3db
tree092e13b1508921ec681e179775f39465d6115753
parent7707ebde21b170f0f4c847a493f8eae08d9284dc
powerpc: Ensure that swiotlb buffer is allocated from low memory

BugLink: https://bugs.launchpad.net/bugs/1861739
[ Upstream commit 8fabc623238e68b3ac63c0dd1657bf86c1fa33af ]

Some powerpc platforms (e.g. 85xx) limit DMA-able memory way below 4G.
If a system has more physical memory than this limit, the swiotlb
buffer is not addressable because it is allocated from memblock using
top-down mode.

Force memblock to bottom-up mode before calling swiotlb_init() to
ensure that the swiotlb buffer is DMA-able.

Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191204123524.22919-1-rppt@kernel.org
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/powerpc/mm/mem.c