lkml.org 
[lkml]   [2008]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: MMIO and gcc re-ordering issue
Date
 > This is a different issue. We deal with it on powerpc by having writel
> set a per-cpu flag and spin_unlock() test it, and do the barrier if
> needed there.

Cool... I assume you do this for mutex_unlock() etc?

Is there any reason why ia64 can't do this too so we can kill mmiowb and
save everyone a lot of hassle? (mips, sh and frv have non-empty
mmiowb() definitions too but I'd guess that these are all bugs based on
misunderstandings of the mmiowb() semantics...)

> However, drivers such as e1000 -also- have a wmb() between filling the
> ring buffer and kicking the DMA with MMIO, with a comment about this
> being needed for ia64 relaxed ordering.

I put these barriers into mthca, mlx4 etc, although it came from my
possible misunderstanding of the memory ordering rules in the kernel
more than any experience of problems (as opposed the the mmiowb()s,
which all came from real world bugs).

- R.


\
 
 \ /
  Last update: 2008-05-27 23:37    [W:0.267 / U:0.120 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site