[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191007175430.GA32537@rani.riverdale.lan>
Date: Mon, 7 Oct 2019 13:54:32 -0400
From: Arvind Sankar <nivedita@...m.mit.edu>
To: Christoph Hellwig <hch@....de>
Cc: Arvind Sankar <nivedita@...m.mit.edu>, linux-kernel@...r.kernel.org
Subject: Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2
On Mon, Oct 07, 2019 at 09:34:48AM +0200, Christoph Hellwig wrote:
> Hi Arvind,
>
> can you try the patch below?
>
>
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index 3f974919d3bd..52b709bf2b55 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -3775,6 +3775,13 @@ static int intel_map_sg(struct device *dev, struct scatterlist *sglist, int nele
> return nelems;
> }
>
> +static u64 intel_get_required_mask(struct device *dev)
> +{
> + if (!iommu_need_mapping(dev))
> + return dma_direct_get_required_mask(dev);
> + return DMA_BIT_MASK(32);
> +}
> +
> static const struct dma_map_ops intel_dma_ops = {
> .alloc = intel_alloc_coherent,
> .free = intel_free_coherent,
> @@ -3787,6 +3794,7 @@ static const struct dma_map_ops intel_dma_ops = {
> .dma_supported = dma_direct_supported,
> .mmap = dma_common_mmap,
> .get_sgtable = dma_common_get_sgtable,
> + .get_required_mask = intel_get_required_mask,
> };
>
> static void
It doesn't boot with the patch. Won't it go
dma_get_required_mask
-> intel_get_required_mask
-> iommu_need_mapping
-> dma_get_required_mask
?
Should the call to dma_get_required_mask in iommu_need_mapping be
replaced with dma_direct_get_required_mask on top of your patch?
Powered by blists - more mailing lists