lkml.org 
[lkml]   [2018]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH net-next] net: stmmac: remove superfluous wmb() memory barriers
    From
    From: Jose Abreu <Jose.Abreu@synopsys.com>
    Date: Fri, 9 Mar 2018 10:26:11 +0000

    > Sorry but I know at least two architectures which don't do a
    > wmb() upon an writel [1] [2]. This can be critical if if we are
    > accessing the device through some slow or filled bus which will
    > delay accesses to the device IO. Notice that writel and then
    > readl to the same address will force CPU to wait for writel
    > completion before readl, but in this case we are using DMA and
    > then writel so I think a wmb() before the writel is a safe measure.

    Wait a second.

    This is not about whether there is an explicit memory barrier
    instruction placed in the writel() implementation.

    Are you saying that the cpu(s) in question will reorder stores in
    their store buffers, even if they are to real memory vs. IOMEM?

    That's really dangerous.

    \
     
     \ /
      Last update: 2018-03-09 16:16    [W:4.255 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site