Re: MMIO and gcc re-ordering issue

From: Linus Torvalds
Date: Tue May 27 2008 - 17:59:59 EST




On Tue, 27 May 2008, Alan Cox wrote:
>
> > re-ordering, even though I doubt it will be visible in practice. So if you
> > use the "__" versions, you'd better have barriers even on x86!
>
> Are we also going to have __ioread*/__iowrite* ?

I doubt there is any reason to. Let's just keep them very strictly
ordered.

> Also is the sematics of __readl/__writel defined for all architectures -
> I used it ages ago in the i2o drivers for speed and it got removed
> because it didn't build on some platforms.

Agreed - I'm not sure the __ versions are really worth it. We have them,
but the semantics are subtle enough that most drivers will never care
enough to really use them.

I would suggest using them mainly for architecture-specific drivers, on
architectures where it actually matters (which is not the case on x86).

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/