Bug 696425 - UV: The intel IOMMU code is using the incorrect dma_mask
Summary: UV: The intel IOMMU code is using the incorrect dma_mask
Keywords:
Status: CLOSED DUPLICATE of bug 696420
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 6.2
Assignee: George Beshers
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks: 652291 688933
TreeView+ depends on / blocked
 
Reported: 2011-04-14 03:27 UTC by George Beshers
Modified: 2011-07-11 15:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-11 15:42:30 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description George Beshers 2011-04-14 03:27:14 UTC
Description of problem:
dma_map_ops.alloc_coherent should be using the coherent_dma_mask, intel_alloc_coherent()
is not.  intel_alloc_coherent() calls __intel_map_single() passing in the correct mask,
hwdev->coherent_dma_mask, but then __intel_map_single() doesn't use it... it ends up 
using the pdev->dma_mask:


    static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
                                         size_t size, int dir, u64 dma_mask)
    {
    ...txt deleted...
            iova = intel_alloc_iova(hwdev, domain, dma_to_mm_pfn(size),
                                    pdev->dma_mask);
                                    ^^^^^^^^^^^^^^

I *think* this call to intel_alloc_iova() should be using the "dma_mask"
passed into it.  We should look into why the code is using pdev->dma_mask
rather than the hwdev->coherent_dma_mask on a dma_map_ops.alloc_coherent()
call other dma_map_ops alloc_coherent routines do.

...

Hopefully final version submitted:

http://marc.info/?l=linux-kernel&m=130220593715364&w=4

Subject: 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 <travis>
Reviewed-by: Mike Habeck <habeck>


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Program Management 2011-04-14 06:02:26 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 George Beshers 2011-07-11 15:42:30 UTC

*** This bug has been marked as a duplicate of bug 696420 ***


Note You need to log in before you can comment on or make changes to this bug.