]> git.baikalelectronics.ru Git - kernel.git/commit
dma-debug: Fix dma_debug_entry offset calculation
authorDaniel Mentz <danielmentz@google.com>
Wed, 16 Dec 2015 01:38:48 +0000 (17:38 -0800)
committerDan Williams <dan.j.williams@intel.com>
Wed, 16 Dec 2015 19:24:26 +0000 (11:24 -0800)
commit95961a2ca8de7faf33aef9de26e16557766c0d29
treed428458458507a455257e0eec6c92ab5917e50df
parent8988b1a0cd9c94a79431b07fe51a420f8f53920a
dma-debug: Fix dma_debug_entry offset calculation

dma-debug uses struct dma_debug_entry to keep track of dma coherent
memory allocation requests. The virtual address is converted into a pfn
and an offset. Previously, the offset was calculated using an incorrect
bit mask.  As a result, we saw incorrect error messages from dma-debug
like the following:

"DMA-API: exceeded 7 overlapping mappings of cacheline 0x03e00000"

Cacheline 0x03e00000 does not exist on our platform.

Cc: <stable@vger.kernel.org>
Fixes: 778cc51ddbec ("dma-debug: introduce debug_dma_assert_idle()")
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
lib/dma-debug.c