aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dma-debug.c
Commit message (Collapse)AuthorAge
* dma-debug: remove broken dma memory leak detection for 2.6.30Joerg Roedel2009-04-26
| | | | | | | | | | | | | | | | | 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 <joerg.roedel@amd.com> Cc: iommu@lists.linux-foundation.org LKML-Reference: <1240576557-22442-1-git-send-email-joerg.roedel@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* dma-debug: fix printk formats (i386)Randy Dunlap2009-03-30
| | | | | | | | | | | | 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 <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dma-debug: make memory range checks more consistentJoerg Roedel2009-03-24
| | | | | | | | | | | | | | | | 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 <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Cc: iommu@lists.linux-foundation.org LKML-Reference: <1237818908-26516-1-git-send-email-joerg.roedel@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* dma-debug: warn of unmapping an invalid dma addressFUJITA Tomonori2009-03-19
| | | | | | | | | | | | Impact: extend DMA-debug checks Calling dma_unmap families against an invalid dma address should be a bug. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Joerg Roedel <joerg.roedel@amd.com> LKML-Reference: <20090319103743N.fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* dma-debug: add a check dma memory leaksJoerg Roedel2009-03-17
| | | | | | | | | Impact: allow architectures to monitor busses for dma mem leakage This patch adds checking code to detect if a device has pending DMA operations when it is about to be unbound from its device driver. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add checks for kernel text and rodataJoerg Roedel2009-03-17
| | | | | | | | | Impact: get notified if a device dma maps illegal areas This patch adds a check to print a warning message when a device driver tries to map a memory area from the kernel text segment or rodata. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: print stacktrace of mapping path on unmap errorDavid Woodhouse2009-03-17
| | | | | | | Impact: saves stacktrace of a dma mapping and prints it if there is an error Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add function to dump dma mappingsDavid Woodhouse2009-03-17
| | | | | | | | | | | | This adds a function to dump the DMA mappings that the debugging code is aware of -- either for a single device, or for _all_ devices. This can be useful for debugging -- sticking a call to it in the DMA page fault handler, for example, to see if the faulting address _should_ be mapped or not, and hence work out whether it's IOMMU bugs we're seeing, or driver bugs. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* dma-debug: add checks for sync_single_sg_*Joerg Roedel2009-03-05
| | | | | | Impact: add debug callbacks for dma_sync_sg_* functions Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add checks for sync_single_range_*Joerg Roedel2009-03-05
| | | | | | Impact: add debug callbacks for dma_sync_single_range_for_* functions Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add checks for sync_single_*Joerg Roedel2009-03-05
| | | | | | Impact: add debug callbacks for dma_sync_single_for_* functions Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add checking for [alloc|free]_coherentJoerg Roedel2009-03-05
| | | | | | Impact: add debug callbacks for dma_[alloc|free]_coherent Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add add checking for map/unmap_sgJoerg Roedel2009-03-05
| | | | | | Impact: add debug callbacks for dma_{un}map_sg Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add checking for map/unmap_page/singleJoerg Roedel2009-03-05
| | | | | | Impact: add debug callbacks for dma_{un}map_[page|single] Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add core checking functionsJoerg Roedel2009-03-05
| | | | | | Impact: add functions to check on dma unmap and sync Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add debugfs interfaceJoerg Roedel2009-03-05
| | | | | | Impact: add debugfs interface for configuring DMA-API debugging Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add kernel command line parametersJoerg Roedel2009-03-05
| | | | | | Impact: add dma_debug= and dma_debug_entries= kernel parameters Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add initialization codeJoerg Roedel2009-03-05
| | | | | | Impact: add code to initialize dma-debug core data structures Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add allocator codeJoerg Roedel2009-03-05
| | | | | | Impact: add allocator code for struct dma_debug_entry Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add hash functions for dma_debug_entriesJoerg Roedel2009-03-05
| | | | | | Impact: implement necessary functions for the core hash Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* dma-debug: add header file and core data structuresJoerg Roedel2009-03-05
Impact: add groundwork for DMA-API debugging Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>