Re: [PATCH v4 06/18] dma: Provide an interface to allow allocate IOVA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



s/dma/dma-mapping/ in the subject.

> function call per API call used in datapath as well as a lot of boilerplate

Please trim commit messages to 73 characters so that they still look good
in git show output.

> +bool dma_iova_try_alloc(struct device *dev, struct dma_iova_state *state,
> +		phys_addr_t phys, size_t size)
> +{
> +	memset(state, 0, sizeof(*state));
> +	if (!use_dma_iommu(dev))
> +		return false;
> +	if (static_branch_unlikely(&iommu_deferred_attach_enabled) &&
> +	    iommu_deferred_attach(dev, iommu_get_domain_for_dev(dev)))
> +		return false;
> +	return iommu_dma_iova_alloc(dev, state, phys, size);
> +}

Now that dma_iova_try_alloc is the only caller of iommu_dma_iova_alloc,
maybe merge the two?

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux