linux-mips
[Top] [All Lists]

mb() calls in octeon / loongson swiotlb dma_map_ops

To: David Daney <ddaney@cavium.com>, Huacai Chen <chenhc@lemote.com>
Subject: mb() calls in octeon / loongson swiotlb dma_map_ops
From: Christoph Hellwig <hch@lst.de>
Date: Sat, 30 Dec 2017 17:09:28 +0100
Cc: Hongliang Tao <taohl@lemote.com>, Hua Yan <yanh@lemote.com>, Alex Smith <alex.smith@imgtec.com>, Ralf Baechle <ralf@linux-mips.org>, Rafał Miłecki <zajec5@gmail.com>, linux-mips@linux-mips.org
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.17 (2007-11-01)
Hi David and others,

I've recently been refactoring the dma direct mapping and swiotlb
code, and one odd thing I noticed is that the octeon and loongson
swiotlb ops have mb() calls after basically all swiotlb calls.

None of that is explained in either the earlier octeon dma map
commits, nor the commit that added the octeon swiotlb support
(b93b2abce497873be97d765b848e0a955d29f200), and neither in the
loonsoon commit that apparently copy and pasted it
(1299b0e05e106f621fff1504df5251f2a678097e).

Can someone explain what these memory barrier are supposed to do?

<Prev in Thread] Current Thread [Next in Thread>
  • mb() calls in octeon / loongson swiotlb dma_map_ops, Christoph Hellwig <=