Thread (2 messages) 2 messages, 2 authors, 2007-08-15

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

From: Russell King <hidden>
Date: 2007-08-15 18:44:29
Also in: lkml

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:
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help