Re: [Kgdb-bugreport] [PATCH 4/5] kgdb: Use atomic operators whichuse barriers

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dmitry Adamushko
Date: Thursday, April 8, 2010 - 9:27 am

> ---

Hmm, but as far as I can see [ Documentation/memory-barriers.txt and
some actual implementations of atomic_inc/dec() ] atomic_inc/dec()
does not imply memory barriers either.

Either I'm missing the real point of this change and the very category
of "memory barriers" bears another meaning here or the following piece
looks especially dubious...

[...]
         * Make sure the above info reaches the primary CPU before
         * our cpu_in_kgdb[] flag setting does:
         */
-       smp_wmb();
-       atomic_set(&cpu_in_kgdb[cpu], 1);
+       atomic_inc(&cpu_in_kgdb[cpu]);

so what ensures the "Make sure the above info reaches..." requirement here?

TIA,


-- Dmitry
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 4/5] kgdb: Use atomic operators which use barriers, Russell King - ARM Linux, (Fri Apr 2, 3:25 pm)
Re: [PATCH 4/5] kgdb: Use atomic operators which use barriers, Russell King - ARM Linux, (Sat Apr 3, 9:08 am)
Re: [Kgdb-bugreport] [PATCH 4/5] kgdb: Use atomic operator ..., Dmitry Adamushko, (Thu Apr 8, 9:27 am)