public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/18] DMA-API debugging facility v4
@ 2009-03-06 13:30 Joerg Roedel
  2009-03-06 13:30 ` [PATCH 01/18] dma-debug: add Kconfig entry Joerg Roedel
                   ` (17 more replies)
  0 siblings, 18 replies; 30+ messages in thread
From: Joerg Roedel @ 2009-03-06 13:30 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, iommu

Hi,

this is version 4 of the patchset which introduces code to debug drivers
usage of the DMA-API. Many thanks to all the reviewers and the useful
comments on the previous versions of this patchset. Appended is a
changelog, the shortlog and the diff-stat.

Changes from v3 -> v4:

- a patch from David Woodhouse adds printing of the mapping path
  stacktrace on an unmap error
- another patch from David added a function which drivers can use to
  dump their DMA mappings
- two new checks in the sync-path check if the dma memory was mapped for
  the requested sync direction
- a check for mapping requests of memory on kernel stacks was added
  (thanks to Arndt Bergmann)
- A bug in the handling of dma_map_sg/dma_unmap_sg pointed out by
  FUJITA Tomonori was fixed
- As a result of the previous fix a check was added to find if a driver
  unmaps different count of sg entries than it mapped
- Various changes to the hash (larger hash size, hash function uses
  lower bits than before)
- Some minor fixes pointed out by reviewers

Changes from v2 -> v3:

- rebased patches against tip/core/iommu branch
- changed storage of virtual address to physical address in
  struct dma_debug_entry (thanks Fujita)
- removed usage of x86 specific bad_dma_address (thanks Fujita)
- changed a error log message to be more clear (thanks Roel)
- fixed a bug with wrong handling of map_page/unmap_page requests
  (thanks Michael)
- various improvements and fixes suggested by Ingo, thanks
- added more comments

Changes from v1 -> v2:

- moved code to lib/ and include/linux to make it usable for all
  architectures
- more fine grained hash locking (locking is now per hash
  bucket, no global lock anymore)
- dma_debug_entries are preallocated
- per default the code will only print one warning and is
  silent then
- added a debugfs interface to see some statistics and to
  enable more verbose error reporting in the kernel log
- added command line parameter to disable debugging code
- allocation errors are now handled correctly
- added documentation about this facility for driver developers


	Joerg

Shortlog:

David Woodhouse (2):
      dma-debug: add function to dump dma mappings
      dma-debug: print stacktrace of mapping path on unmap error

Joerg Roedel (16):
      dma-debug: add Kconfig entry
      dma-debug: add header file and core data structures
      dma-debug: add hash functions for dma_debug_entries
      dma-debug: add allocator code
      dma-debug: add initialization code
      dma-debug: add kernel command line parameters
      dma-debug: add debugfs interface
      dma-debug: add core checking functions
      dma-debug: add checking for map/unmap_page/single
      dma-debug: add add checking for map/unmap_sg
      dma-debug: add checking for [alloc|free]_coherent
      dma-debug: add checks for sync_single_*
      dma-debug: add checks for sync_single_range_*
      dma-debug: add checks for sync_single_sg_*
      dma-debug: x86 architecture bindings
      dma-debug: Documentation update

Diffstat:

 Documentation/DMA-API.txt           |  106 +++++
 Documentation/kernel-parameters.txt |   10 +
 arch/Kconfig                        |    2 +
 arch/x86/Kconfig                    |    1 +
 arch/x86/include/asm/dma-mapping.h  |   45 ++-
 arch/x86/kernel/pci-dma.c           |    6 +
 include/linux/dma-debug.h           |  167 +++++++
 lib/Kconfig.debug                   |   11 +
 lib/Makefile                        |    2 +
 lib/dma-debug.c                     |  870 +++++++++++++++++++++++++++++++++++
 10 files changed, 1214 insertions(+), 6 deletions(-)
 create mode 100644 include/linux/dma-debug.h
 create mode 100644 lib/dma-debug.c




^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2009-03-20  8:47 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 13:30 [PATCH 0/18] DMA-API debugging facility v4 Joerg Roedel
2009-03-06 13:30 ` [PATCH 01/18] dma-debug: add Kconfig entry Joerg Roedel
2009-03-06 13:30 ` [PATCH 02/18] dma-debug: add header file and core data structures Joerg Roedel
2009-03-06 13:30 ` [PATCH 03/18] dma-debug: add hash functions for dma_debug_entries Joerg Roedel
2009-03-06 13:50   ` Frederic Weisbecker
2009-03-06 18:45     ` Cyrill Gorcunov
2009-03-06 19:11       ` Frederic Weisbecker
2009-03-06 19:16         ` Cyrill Gorcunov
2009-03-06 19:18           ` Frederic Weisbecker
2009-03-06 19:25           ` Joerg Roedel
2009-03-06 19:38             ` Cyrill Gorcunov
2009-03-06 19:54               ` Joerg Roedel
2009-03-06 13:30 ` [PATCH 04/18] dma-debug: add allocator code Joerg Roedel
2009-03-06 13:30 ` [PATCH 05/18] dma-debug: add initialization code Joerg Roedel
2009-03-06 13:30 ` [PATCH 06/18] dma-debug: add kernel command line parameters Joerg Roedel
2009-03-06 13:30 ` [PATCH 07/18] dma-debug: add debugfs interface Joerg Roedel
2009-03-06 13:45   ` Frederic Weisbecker
2009-03-06 13:30 ` [PATCH 08/18] dma-debug: add core checking functions Joerg Roedel
2009-03-06 13:30 ` [PATCH 09/18] dma-debug: add checking for map/unmap_page/single Joerg Roedel
2009-03-19  1:39   ` FUJITA Tomonori
2009-03-20  8:46     ` Joerg Roedel
2009-03-06 13:30 ` [PATCH 10/18] dma-debug: add add checking for map/unmap_sg Joerg Roedel
2009-03-06 13:30 ` [PATCH 11/18] dma-debug: add checking for [alloc|free]_coherent Joerg Roedel
2009-03-06 13:30 ` [PATCH 12/18] dma-debug: add checks for sync_single_* Joerg Roedel
2009-03-06 13:30 ` [PATCH 13/18] dma-debug: add checks for sync_single_range_* Joerg Roedel
2009-03-06 13:30 ` [PATCH 14/18] dma-debug: add checks for sync_single_sg_* Joerg Roedel
2009-03-06 13:30 ` [PATCH 15/18] dma-debug: add function to dump dma mappings Joerg Roedel
2009-03-06 13:30 ` [PATCH 16/18] dma-debug: x86 architecture bindings Joerg Roedel
2009-03-06 13:30 ` [PATCH 17/18] dma-debug: Documentation update Joerg Roedel
2009-03-06 13:30 ` [PATCH 18/18] dma-debug: print stacktrace of mapping path on unmap error Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox