Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9dfda12b authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Ingo Molnar
Browse files

swiotlb: use map_single instead of swiotlb_map_single in swiotlb_alloc_coherent



We always need swiotlb memory here so address_needs_mapping and
swiotlb_force testings are irrelevant. map_single should be used here
instead of swiotlb_map_single.

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 68e91d61
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -483,12 +483,9 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
		 * swiotlb_map_single(), which will grab memory from
		 * swiotlb_map_single(), which will grab memory from
		 * the lowest available address range.
		 * the lowest available address range.
		 */
		 */
		dma_addr_t handle;
		ret = map_single(hwdev, NULL, size, DMA_FROM_DEVICE);
		handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
		if (!ret)
		if (swiotlb_dma_mapping_error(hwdev, handle))
			return NULL;
			return NULL;

		ret = bus_to_virt(handle);
	}
	}


	memset(ret, 0, size);
	memset(ret, 0, size);