diff options
author | Robin Murphy <robin.murphy@arm.com> | 2016-04-13 17:29:10 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-05-09 15:33:29 +0200 |
commit | 3b6b7e19e31a816ee02a8d4372cbea9ad7db3784 (patch) | |
tree | 28196392e6972feaf5ead20f9ecaf8e9af7ca140 /arch/arm64 | |
parent | d16e0faab911cc0e100a1e8e93635b432566608e (diff) | |
download | blackbird-op-linux-3b6b7e19e31a816ee02a8d4372cbea9ad7db3784.tar.gz blackbird-op-linux-3b6b7e19e31a816ee02a8d4372cbea9ad7db3784.zip |
iommu/dma: Finish optimising higher-order allocations
Now that we know exactly which page sizes our caller wants to use in the
given domain, we can restrict higher-order allocation attempts to just
those sizes, if any, and avoid wasting any time or effort on other sizes
which offer no benefit. In the same vein, this also lets us accommodate
a minimum order greater than 0 for special cases.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Yong Wu <yong.wu@mediatek.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/mm/dma-mapping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 5d36907f9b12..41d19a0fc9c0 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -562,8 +562,8 @@ static void *__iommu_alloc_attrs(struct device *dev, size_t size, struct page **pages; pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL, coherent); - pages = iommu_dma_alloc(dev, iosize, gfp, ioprot, handle, - flush_page); + pages = iommu_dma_alloc(dev, iosize, gfp, attrs, ioprot, + handle, flush_page); if (!pages) return NULL; |