[openib-general] [PATCH] use mmiowb after doorbell ring

Roland Dreier rdreier at cisco.com
Tue Oct 17 11:03:22 PDT 2006


 > > I don't think an mmiowb() equivalent is available from userspace.
 > 
 > Isn't this just an asm() command?

Nope, look at the kernel source, specifically arch/ia64/sn/kernel/iomv.c

 > BTW, I think we really should implement proper rmb/wmb in arch.h.
 > Last time I looked we only had compiler barriers here, and
 > this means, I think, that a read from e.g. CQE contents could bypass
 > the read of the CQE valid bit.

I'm not absolutely sure everything there is correct but I did my best,
for example

#elif defined(__ia64__)

#define mb()    asm volatile("mf" ::: "memory")

Do you know of any specific archs that are broken?

 - R.




More information about the general mailing list