29 May, 2009

3 commits

  • DMA-mapping.txt says that debug_dma_sync_sg family must be called with
    the _same_ one you passed into the dma_map_sg call, it should _NOT_ be
    the 'count' value _returned_ from the dma_map_sg call.

    debug_dma_sync_sg_for_cpu and debug_dma_sync_sg_for_device can't
    handle this properly; they need to use the sg_mapped_ents in struct
    dma_debug_entry as debug_dma_unmap_sg() does.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Joerg Roedel

    FUJITA Tomonori
     
  • debug_dma_map_sg() and debug_dma_unmap_sg() use length in struct
    scatterlist while debug_dma_sync_sg_for_cpu() and
    debug_dma_sync_sg_for_device() use dma_length. This causes bugs
    warnings on some IOMMU implementations since these values are not
    same; the length doesn't represent the dma length.

    We always need to use sg_dma_len() accessor to get the dma length of a
    scatterlist entry.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Joerg Roedel

    FUJITA Tomonori
     
  • Architectures might not have dma_address in struct scatterlist (PARISC
    doesn't). Directly accessing to dma_address in struct scatterlist is
    wrong; we need to use sg_dma_address() accesssor instead.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Joerg Roedel

    FUJITA Tomonori
     

28 May, 2009

1 commit


11 May, 2009

1 commit


27 Apr, 2009

1 commit

  • The feature needs some more work because the notfier which is used to
    check for pending allocations is called before the device drivers
    ->remove() function. Therefore this feature reports false positives.

    A real fix for this issue is to introduce a new notifier event which sent
    _after_ the driver has deinitialized itself. That will done for the next
    kernel version.

    [ Impact: reduce the scope of CONFIG_DMA_API_DEBUG=y checks ]

    Signed-off-by: Joerg Roedel
    Cc: iommu@lists.linux-foundation.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Joerg Roedel
     

15 Apr, 2009

1 commit

  • We use a static value for the number of dma_debug_entries. It can be
    overwritten by a kernel command line option.

    Some IOMMUs (e.g. GART) can't set an appropriate value by a kernel
    command line option because they can't know such value until they
    finish initializing up their hardware.

    This patch adds dma_debug_resize_entries() enables IOMMUs to adjust
    the number of dma_debug_entries anytime.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Joerg Roedel
    Cc: fujita.tomonori@lab.ntt.co.jp
    Cc: akpm@linux-foundation.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    FUJITA Tomonori
     

31 Mar, 2009

1 commit

  • Fix printk format warnings in dma-debug:

    lib/dma-debug.c:645: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
    lib/dma-debug.c:662: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
    lib/dma-debug.c:676: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
    lib/dma-debug.c:686: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

24 Mar, 2009

1 commit

  • Impact: extend on-kernel-stack DMA debug checks to all !highmem pages

    We only checked dma_map_single() - extend it to dma_map_page()
    and dma_map_sg() as well.

    Also, fix dma_map_single() corner case bug: make sure we dont
    stack-check highmem (not mapped) pages.

    Reported-by: FUJITA Tomonori
    Signed-off-by: Joerg Roedel
    Cc: iommu@lists.linux-foundation.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Joerg Roedel
     

19 Mar, 2009

1 commit


17 Mar, 2009

4 commits


06 Mar, 2009

12 commits


05 Mar, 2009

1 commit