2011-03-29 23:36:45

by Mike Travis

[permalink] [raw]
Subject: [PATCH 4/4] Intel pci: Use coherent DMA mask when requested

The __intel_map_single function is not honoring the passed in
DMA mask. This results in not using the coherent DMA mask when
called from intel_alloc_coherent().

Signed-off-by: Mike Travis <[email protected]>
Reviewed-by: Mike Habeck <[email protected]>
---
drivers/pci/intel-iommu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- linux.orig/drivers/pci/intel-iommu.c
+++ linux/drivers/pci/intel-iommu.c
@@ -2582,8 +2582,7 @@ static dma_addr_t __intel_map_single(str
iommu = domain_get_iommu(domain);
size = aligned_nrpages(paddr, size);

- iova = intel_alloc_iova(hwdev, domain, dma_to_mm_pfn(size),
- pdev->dma_mask);
+ iova = intel_alloc_iova(hwdev, domain, dma_to_mm_pfn(size), dma_mask);
if (!iova)
goto error;


--


2011-03-30 18:03:40

by Chris Wright

[permalink] [raw]
Subject: Re: [PATCH 4/4] Intel pci: Use coherent DMA mask when requested

* Mike Travis ([email protected]) wrote:
> The __intel_map_single function is not honoring the passed in
> DMA mask. This results in not using the coherent DMA mask when
> called from intel_alloc_coherent().
>
> Signed-off-by: Mike Travis <[email protected]>
> Reviewed-by: Mike Habeck <[email protected]>

Hmm, looks like it has actually been broken since it was introduced
in bb9e6d65.

Acked-by: Chris Wright <[email protected]>

2011-04-01 02:58:16

by FUJITA Tomonori

[permalink] [raw]
Subject: Re: [PATCH 4/4] Intel pci: Use coherent DMA mask when requested

On Wed, 30 Mar 2011 11:02:45 -0700
Chris Wright <[email protected]> wrote:

> * Mike Travis ([email protected]) wrote:
> > The __intel_map_single function is not honoring the passed in
> > DMA mask. This results in not using the coherent DMA mask when
> > called from intel_alloc_coherent().
> >
> > Signed-off-by: Mike Travis <[email protected]>
> > Reviewed-by: Mike Habeck <[email protected]>
>
> Hmm, looks like it has actually been broken since it was introduced
> in bb9e6d65.

Oops, you are right.

The patch looks good to me.

Thanks,