Cc: Linus Torvalds <torvalds@...>, Benjamin Herrenschmidt <benh@...>, <akpm@...>, Linux Kernel Mailing List <linux-kernel@...>, <linuxppc-dev@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>
On Friday 19 October 2007 12:32, Herbert Xu wrote:
Not unless you mean a pair of spin lock/unlock as in
2 spin lock/unlock pairs (4 operations).
*X = 10;
spin_lock(&lock);
/* *Y speculatively loaded here */
/* store to *X leaves CPU store queue here */
spin_unlock(&lock);
y = *Y;
I don't use the sparc barriers, so they don't come naturally to
me ;)
I think both loads and stores can pass into the critical section
by having the spin_lock pass earlier ops, or by having spin_unlock
be passed by later ones.
-