Thread (6 messages) flat view 6 messages, 3 authors, 2006-12-11

Re: Is in_le32 and out_le32 atomic?

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-12-11 06:48:46

On Fri, 2006-12-08 at 21:15 +0100, Arnd Bergmann wrote:
On Friday 08 December 2006 21:05, Wolfgang Grandegger wrote:
quoted
Can anybody tell me why the spin_* protection is needed? I thought that 
32-bit read and write operations are atomic.
The spinlocks are needed to guarantee ordering between the completion of
the i/o access and other code. A typical problem is that a store is
still on its way to the I/O device while the CPU has already left the
function that initiated it, and might call code that relies on the
value having arrived there.
That will not help much with the spinlock, especially not seeing how
they are used in the code.

I think the lock is totally spurrious in that case.

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help