Merge tag 'fuse-update-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mszered...
[sfrench/cifs-2.6.git] / Documentation / memory-barriers.txt
index 983249906fc691c2e72d4c6c2d098a3efd71dc10..a02d6bbfc9d0ae1958d3928ba1be441d3a60fa0a 100644 (file)
@@ -1920,9 +1920,6 @@ There are some more advanced barrier functions:
                /* assign ownership */
                desc->status = DEVICE_OWN;
 
-               /* force memory to sync before notifying device via MMIO */
-               wmb();
-
                /* notify device of new descriptors */
                writel(DESC_NOTIFY, doorbell);
        }
@@ -1930,11 +1927,15 @@ There are some more advanced barrier functions:
      The dma_rmb() allows us guarantee the device has released ownership
      before we read the data from the descriptor, and the dma_wmb() allows
      us to guarantee the data is written to the descriptor before the device
-     can see it now has ownership.  The wmb() is needed to guarantee that the
-     cache coherent memory writes have completed before attempting a write to
-     the cache incoherent MMIO region.
+     can see it now has ownership.  Note that, when using writel(), a prior
+     wmb() is not needed to guarantee that the cache coherent memory writes
+     have completed before writing to the MMIO region.  The cheaper
+     writel_relaxed() does not provide this guarantee and must not be used
+     here.
 
-     See Documentation/DMA-API.txt for more information on consistent memory.
+     See the subsection "Kernel I/O barrier effects" for more information on
+     relaxed I/O accessors and the Documentation/DMA-API.txt file for more
+     information on consistent memory.
 
 
 MMIO WRITE BARRIER
@@ -3083,7 +3084,7 @@ CIRCULAR BUFFERS
 Memory barriers can be used to implement circular buffering without the need
 of a lock to serialise the producer with the consumer.  See:
 
-       Documentation/circular-buffers.txt
+       Documentation/core-api/circular-buffers.rst
 
 for details.