summaryrefslogtreecommitdiffstats
path: root/kernel/dma/debug.c
diff options
context:
space:
mode:
authorHamza Mahfooz <someguy@effective-light.com>2021-05-18 14:54:43 +0200
committerChristoph Hellwig <hch@lst.de>2021-06-22 08:15:47 +0200
commit2b4bbc6231d789f58676d2ccc42177df163e1c4a (patch)
treec7ec7d228c7fcd3b551f527de9c70f0ea07730a5 /kernel/dma/debug.c
parentdma-mapping: remove a trailing space (diff)
downloadlinux-2b4bbc6231d789f58676d2ccc42177df163e1c4a.tar.xz
linux-2b4bbc6231d789f58676d2ccc42177df163e1c4a.zip
dma-debug: report -EEXIST errors in add_dma_entry
Since, overlapping mappings are not supported by the DMA API we should report an error if active_cacheline_insert returns -EEXIST. Suggested-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Hamza Mahfooz <someguy@effective-light.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel/dma/debug.c')
-rw-r--r--kernel/dma/debug.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index 14de1271463f..dadae6255d05 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -566,11 +566,9 @@ static void add_dma_entry(struct dma_debug_entry *entry)
if (rc == -ENOMEM) {
pr_err("cacheline tracking ENOMEM, dma-debug disabled\n");
global_disable = true;
+ } else if (rc == -EEXIST) {
+ pr_err("cacheline tracking EEXIST, overlapping mappings aren't supported\n");
}
-
- /* TODO: report -EEXIST errors here as overlapping mappings are
- * not supported by the DMA API
- */
}
static int dma_debug_create_entries(gfp_t gfp)