diff options
| author | Takashi Iwai <tiwai@suse.de> | 2026-04-09 08:31:21 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-04-09 08:32:17 +0200 |
| commit | 3f44bccdd6605d5d156c02ea2f861dcd30ef5dcd (patch) | |
| tree | 799286d69c8ea6060573bce2efdc10ea089ed356 /kernel/dma/debug.c | |
| parent | 292286b2d229fb732421429b027d38ac3f969383 (diff) | |
| parent | 00afb1811fa638dacf125dd1c343b7a181624dfd (diff) | |
| download | linux-3f44bccdd6605d5d156c02ea2f861dcd30ef5dcd.tar.gz linux-3f44bccdd6605d5d156c02ea2f861dcd30ef5dcd.zip | |
Merge branch 'for-linus' into for-next
Pull 7.0-devel branch for further development of HD-audio codec quirks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'kernel/dma/debug.c')
| -rw-r--r-- | kernel/dma/debug.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c index 86f87e43438c..0677918f06a8 100644 --- a/kernel/dma/debug.c +++ b/kernel/dma/debug.c @@ -453,7 +453,7 @@ static int active_cacheline_set_overlap(phys_addr_t cln, int overlap) return overlap; } -static void active_cacheline_inc_overlap(phys_addr_t cln) +static void active_cacheline_inc_overlap(phys_addr_t cln, bool is_cache_clean) { int overlap = active_cacheline_read_overlap(cln); @@ -462,7 +462,7 @@ static void active_cacheline_inc_overlap(phys_addr_t cln) /* If we overflowed the overlap counter then we're potentially * leaking dma-mappings. */ - WARN_ONCE(overlap > ACTIVE_CACHELINE_MAX_OVERLAP, + WARN_ONCE(!is_cache_clean && overlap > ACTIVE_CACHELINE_MAX_OVERLAP, pr_fmt("exceeded %d overlapping mappings of cacheline %pa\n"), ACTIVE_CACHELINE_MAX_OVERLAP, &cln); } @@ -495,7 +495,7 @@ static int active_cacheline_insert(struct dma_debug_entry *entry, if (rc == -EEXIST) { struct dma_debug_entry *existing; - active_cacheline_inc_overlap(cln); + active_cacheline_inc_overlap(cln, entry->is_cache_clean); existing = radix_tree_lookup(&dma_active_cacheline, cln); /* A lookup failure here after we got -EEXIST is unexpected. */ WARN_ON(!existing); @@ -601,7 +601,8 @@ static void add_dma_entry(struct dma_debug_entry *entry, unsigned long attrs) unsigned long flags; int rc; - entry->is_cache_clean = !!(attrs & DMA_ATTR_CPU_CACHE_CLEAN); + entry->is_cache_clean = attrs & (DMA_ATTR_DEBUGGING_IGNORE_CACHELINES | + DMA_ATTR_REQUIRE_COHERENT); bucket = get_hash_bucket(entry, &flags); hash_bucket_add(bucket, entry); |
