diff options
author | James Morris <james.l.morris@oracle.com> | 2015-11-23 14:46:28 +0300 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2015-11-23 14:46:28 +0300 |
commit | ebd68df3f24b318d391d15c458d6f43f340ba36a (patch) | |
tree | f0277bc4b853abe5db1d30fa4e10b05bba7f2ac5 /lib/dma-debug.c | |
parent | e42852bf88144affc227884b62637118ba74b783 (diff) | |
parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) | |
download | linux-ebd68df3f24b318d391d15c458d6f43f340ba36a.tar.xz |
Sync to Linus v4.4-rc2 for LSM developers.
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r-- | lib/dma-debug.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index dace71fe41f7..8855f019ebe8 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -100,7 +100,7 @@ static LIST_HEAD(free_entries); static DEFINE_SPINLOCK(free_entries_lock); /* Global disable flag - will be set in case of an error */ -static u32 global_disable __read_mostly; +static bool global_disable __read_mostly; /* Early initialization disable flag, set at the end of dma_debug_init */ static bool dma_debug_initialized __read_mostly; @@ -1249,6 +1249,14 @@ static void check_sync(struct device *dev, dir2name[entry->direction], dir2name[ref->direction]); + if (ref->sg_call_ents && ref->type == dma_debug_sg && + ref->sg_call_ents != entry->sg_call_ents) { + err_printk(ref->dev, entry, "DMA-API: device driver syncs " + "DMA sg list with different entry count " + "[map count=%d] [sync count=%d]\n", + entry->sg_call_ents, ref->sg_call_ents); + } + out: put_hash_bucket(bucket, &flags); } |