x86/dma/amd_gart: Use dma_direct_{alloc,free}()
authorChristoph Hellwig <hch@lst.de>
Mon, 19 Mar 2018 10:38:18 +0000 (11:38 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 20 Mar 2018 09:01:57 +0000 (10:01 +0100)
commit51c7eeba7975c1d2a02eefd00ece6de25176f5f3
tree4f9545f2728d36a77c21ded07a5f06cfa86d4b65
parentf3c39d51043dcee5dd4d51dffcfe9ce01a263582
x86/dma/amd_gart: Use dma_direct_{alloc,free}()

This gains support for CMA allocations for the force_iommu case, and
cleans up the code a bit.

Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Muli Ben-Yehuda <mulix@mulix.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: iommu@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/20180319103826.12853-7-hch@lst.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/amd_gart_64.c