diff options
author | Vegard Nossum <vegard.nossum@gmail.com> | 2008-07-20 10:44:54 +0200 |
---|---|---|
committer | Vegard Nossum <vegard.nossum@gmail.com> | 2009-06-15 12:40:05 +0200 |
commit | d7002857dee6e9a3ce1f78d23f37caba106b29c5 (patch) | |
tree | 64453eb81be8409937a6daf207442cf5021e3b5e /arch/x86/include/asm/dma-mapping.h | |
parent | 2dff440525f8faba8836e9f05297b76f23b4af30 (diff) | |
download | blackbird-op-linux-d7002857dee6e9a3ce1f78d23f37caba106b29c5.tar.gz blackbird-op-linux-d7002857dee6e9a3ce1f78d23f37caba106b29c5.zip |
kmemcheck: add DMA hooks
This patch hooks into the DMA API to prevent the reporting of the
false positives that would otherwise be reported when memory is
accessed that is also used directly by devices.
[rebased for mainline inclusion]
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Diffstat (limited to 'arch/x86/include/asm/dma-mapping.h')
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index f82fdc412c64..d57d0c1857bc 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h @@ -6,6 +6,7 @@ * Documentation/DMA-API.txt for documentation. */ +#include <linux/kmemcheck.h> #include <linux/scatterlist.h> #include <linux/dma-debug.h> #include <linux/dma-attrs.h> @@ -60,6 +61,7 @@ dma_map_single(struct device *hwdev, void *ptr, size_t size, dma_addr_t addr; BUG_ON(!valid_dma_direction(dir)); + kmemcheck_mark_initialized(ptr, size); addr = ops->map_page(hwdev, virt_to_page(ptr), (unsigned long)ptr & ~PAGE_MASK, size, dir, NULL); |