Re: arch/x86/Kconfig selects invalid HAVE_READQ, HAVE_WRITEQ vars

From: Roland Dreier
Date: Sun Apr 19 2009 - 20:57:19 EST


> Also, atomicity might not be possible to guarantee on the bus level:
> say the device sits on a 32-bit PCI bus. (No matter what instruction
> the CPU gets, a readq/writeq there has to be done as two 32-bit bus
> accesses.)

Well, the conventional PCI devices I know of with 64-bit registers were
PCI-X cards, keyed so they would only fit into a 64-bit slot. And of
course there is no such thing as 32-bit PCI Express.

> (Also, even a genuine 64-bit device might be bridged over 32-bit
> pathways so a driver cannot really assume atomicity on that level.)

I have never even heard of a system with a 64-bit PCI slot that went
through a 32-bit pathway -- in fact I'm not sure how one could build
that.

But yes, for example on 32-bit PowerPC I don't think it's possible to
generate a 64-bit bus transaction in general. So if a device requires
such a cycle then it simply can't work on such a system. But there is
also the case where racing accesses to other registers must be avoided
(the mthca example I gave in my previous example) where the current
32-bit x86 definition is broken, but it could be fixed in a
driver-specific version that used a spinlock.

- R.
--
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/