aboutsummaryrefslogtreecommitdiff
path: root/include/linux/fpga/fpga-mgr.h
diff options
context:
space:
mode:
authorDan Williams <[email protected]>2014-03-03 15:38:21 -0800
committerLinus Torvalds <[email protected]>2014-03-04 07:55:47 -0800
commit3b7a6418c7494b8bf0bf0537ddee1dedbca10f51 (patch)
treed40bbdfb1f0d2690d14f22988450a2f8b91b6767 /include/linux/fpga/fpga-mgr.h
parent668f9abbd4334e6c29fa8acd71635c4f9101caa7 (diff)
dma debug: account for cachelines and read-only mappings in overlap tracking
While debug_dma_assert_idle() checks if a given *page* is actively undergoing dma the valid granularity of a dma mapping is a *cacheline*. Sander's testing shows that the warning message "DMA-API: exceeded 7 overlapping mappings of pfn..." is falsely triggering. The test is simply mapping multiple cachelines in a given page. Ultimately we want overlap tracking to be valid as it is a real api violation, so we need to track active mappings by cachelines. Update the active dma tracking to use the page-frame-relative cacheline of the mapping as the key, and update debug_dma_assert_idle() to check for all possible mapped cachelines for a given page. However, the need to track active mappings is only relevant when the dma-mapping is writable by the device. In fact it is fairly standard for read-only mappings to have hundreds or thousands of overlapping mappings at once. Limiting the overlap tracking to writable (!DMA_TO_DEVICE) eliminates this class of false-positive overlap reports. Note, the radix gang lookup is sub-optimal. It would be best if it stopped fetching entries once the search passed a page boundary. Nevertheless, this implementation does not perturb the original net_dma failing case. That is to say the extra overhead does not show up in terms of making the failing case pass due to a timing change. References: http://marc.info/?l=linux-netdev&m=139232263419315&w=2 http://marc.info/?l=linux-netdev&m=139217088107122&w=2 Signed-off-by: Dan Williams <[email protected]> Reported-by: Sander Eikelenboom <[email protected]> Reported-by: Dave Jones <[email protected]> Tested-by: Dave Jones <[email protected]> Tested-by: Sander Eikelenboom <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Francois Romieu <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Wei Liu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions