[lkml]   [2008]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: MMIO and gcc re-ordering issue
 > The problem is that your two writel's, despite being both issued on
> cpu X, due to the spin lock, in your example, can end up with the
> first one going through NR 1 and the second one going through NR 2. If
> there's contention on NR 1, the write going via NR 2 may hit the PCI
> bridge prior to the one going via NR 1.

Really?? I can't see how you can expect any drivers to work reliably if
simple code like


might end up with the write to reg2 hitting the device before the write
to reg1. Almost all MMIO stuff has ordering requirements and will
totally break if you allow, say, the "start IO" write to be reordered
before the "set IO address" write.

- R.

 \ /
  Last update: 2008-05-30 00:09    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean