Segher Boessenkool wrote:
The hardware must not see that is given ownership of a buffer until it is completely written, and when the driver receives ownership of a buffer, it must ensure that any other reads to the buffer reflect its final state. Thus, I/O barriers are added where required.Without this patch, I have observed GCC reordering the setting of bdp->length and bdp->status in gfar_new_skb.The :::"memory" in the barriers you used prevent GCC from reordering accesses around the barriers.
Sure... it was just an example to point out that it's actually happening, rather than a theoretical concern.
AFAICS you need stronger barriers though; {w,r,}mb(),
to prevent _any_ reordering of those memory accesses,
not just the compiler-generated ones.
My impression was that the eieio used by iobarrier would be sufficient for that, as we're not trying to synchronize between accesses to different types of memory. Is sync really required here?
-Scott - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
