Re: cmpxchg is not available to generic code

From: Nick Piggin
Date: Mon Jul 23 2007 - 02:48:49 EST


Dave Airlie wrote:
On 7/19/07, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

On Thu, 19 Jul 2007 18:15:03 +1000 "Dave Airlie" <airlied@xxxxxxxxx> wrote:

> Maybe we could add CONFIG_HAVE_CMPXCHG and let DRM depend on it..

That would certainly be better than adding a sprinkle of architectures
in DRM Kconfig dependencies.

I don't know how important DRM is on ARM. Zero?


I'd guess zero I suppose if you wanted you could hook up a PCI
graphics card on ARM, but if you do that I think you could implement
cmpxchg :-)

ARM does the locked load / store conditional thing which is at least as
strong as cmpxchg, so I imagine it could implement this API in kernel
and userspace quite easily if needed.

--
SUSE Labs, Novell Inc.
-
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/