summaryrefslogtreecommitdiff
path: root/arch/arc
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2026-04-06 16:23:00 -0700
committerDanilo Krummrich <dakr@kernel.org>2026-04-26 23:43:58 +0200
commit3e2c1e213ac2bfc9068a2686ef380ee0d8bef949 (patch)
tree4741361eebcf4801091840c606ea377d956c2634 /arch/arc
parent7befbf1281290876734046996ee861d7539532c1 (diff)
downloadlinux-next-3e2c1e213ac2bfc9068a2686ef380ee0d8bef949.tar.gz
linux-next-3e2c1e213ac2bfc9068a2686ef380ee0d8bef949.zip
driver core: Replace dev->dma_coherent with dev_dma_coherent()
In C, bitfields are not necessarily safe to modify from multiple threads without locking. Switch "dma_coherent" over to the "flags" field so modifications are safe. Cc: Christoph Hellwig <hch@lst.de> Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Vinod Koul <vkoul@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patch.msgid.link/20260406162231.v5.7.If839f6dde98979fce177f70c6c74689a1904ee76@changeid [ Since all DEV_FLAG_DMA_COHERENT accessors are exposed unconditionally, also drop the CONFIG guards around dev_assign_dma_coherent() in device_initialize() to ensure a correct default value. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/mm/dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c
index 6b85e94f3275..9b9adb02b4c5 100644
--- a/arch/arc/mm/dma.c
+++ b/arch/arc/mm/dma.c
@@ -98,8 +98,8 @@ void arch_setup_dma_ops(struct device *dev, bool coherent)
* DMA buffers.
*/
if (is_isa_arcv2() && ioc_enable && coherent)
- dev->dma_coherent = true;
+ dev_set_dma_coherent(dev);
dev_info(dev, "use %scoherent DMA ops\n",
- dev->dma_coherent ? "" : "non");
+ dev_dma_coherent(dev) ? "" : "non");
}