diff options
author | Christoph Hellwig <hch@lst.de> | 2019-08-06 15:01:38 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-09-04 11:13:19 +0200 |
commit | 249baa54790171438524ba97e8e0485dd6aa2762 (patch) | |
tree | cf5dc669ac064a93a37912f25aa7910d7e8db58d /arch/x86/kernel/amd_gart_64.c | |
parent | d9295532d5725e5926d76470acdfd239c8d2aad3 (diff) |
dma-mapping: provide a better default ->get_required_mask
Most dma_map_ops instances are IOMMUs that work perfectly fine in 32-bits
of IOVA space, and the generic direct mapping code already provides its
own routines that is intelligent based on the amount of memory actually
present. Wire up the dma-direct routine for the ARM direct mapping code
as well, and otherwise default to the constant 32-bit mask. This way
we only need to override it for the occasional odd IOMMU that requires
64-bit IOVA support, or IOMMU drivers that are more efficient if they
can fall back to the direct mapping.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/x86/kernel/amd_gart_64.c')
-rw-r--r-- | arch/x86/kernel/amd_gart_64.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c index f72c487d68a8..a6ac3712db8b 100644 --- a/arch/x86/kernel/amd_gart_64.c +++ b/arch/x86/kernel/amd_gart_64.c @@ -680,6 +680,7 @@ static const struct dma_map_ops gart_dma_ops = { .mmap = dma_common_mmap, .get_sgtable = dma_common_get_sgtable, .dma_supported = dma_direct_supported, + .get_required_mask = dma_direct_get_required_mask, }; static void gart_iommu_shutdown(void) |