Re: [RFP] atomic[64]_[read|set] asm implementations

From: Russell King
Date: Wed Aug 15 2007 - 14:44:31 EST


On Wed, Aug 15, 2007 at 01:55:37PM -0400, Chris Snook wrote:
> For architectures whose maintainers aren't worried and whose
> developers/users aren't bothered enough to submit an inline assembly
> patch, I'll just keep the inlines with the *(volatile foo *)& casts,
> unless of course ISO clarifies the C standard to different effect while
> we're arguing over semantics and micro-optimizations.

I have no problem with your latest patch for ARM. Moving ARM to
assembly will actually remove some information which the compiler
has when it knows about the access to be performed.

If atomic_read() were converted to inline assembly, we'd prevent the
compiler from knowing that a load has been performed and it should
therefore avoid using the result of the load where possible for the
following few instructions (due to result delays.)

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
-
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/