<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/asm-generic/atomic.h, branch v4.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-10-03T04:06:23Z</updated>
<entry>
<title>locking,arch: Use ACCESS_ONCE() instead of cast to volatile in atomic_read()</title>
<updated>2014-10-03T04:06:23Z</updated>
<author>
<name>Pranith Kumar</name>
<email>bobby.prani@gmail.com</email>
</author>
<published>2014-09-23T14:29:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2291059c852706c6f5ffb400366042b7625066cd'/>
<id>urn:sha1:2291059c852706c6f5ffb400366042b7625066cd</id>
<content type='text'>
Use the much more reader friendly ACCESS_ONCE() instead of the cast to volatile.
This is purely a stylistic change.

Signed-off-by: Pranith Kumar &lt;bobby.prani@gmail.com&gt;
Acked-by: Jesper Nilsson &lt;jesper.nilsson@axis.com&gt;
Acked-by: Hans-Christian Egtvedt &lt;egtvedt@samfundet.no&gt;
Acked-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: linux-arch@vger.kernel.org
Link: http://lkml.kernel.org/r/1411482607-20948-1-git-send-email-bobby.prani@gmail.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>locking,arch: Rewrite generic atomic support</title>
<updated>2014-08-14T10:48:14Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2014-04-23T14:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=560cb12a4080a48b84da8b96878cafbd193c4d64'/>
<id>urn:sha1:560cb12a4080a48b84da8b96878cafbd193c4d64</id>
<content type='text'>
Rewrite generic atomic support to only require cmpxchg(), generate all
other primitives from that.

Furthermore reduce the endless repetition for all these primitives to
a few CPP macros. This way we get more for less lines.

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20140508135852.940119622@infradead.org
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: linux-arch@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>arch: Prepare for smp_mb__{before,after}_atomic()</title>
<updated>2014-04-18T09:40:30Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2014-02-06T17:16:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=febdbfe8a91ce0d11939d4940b592eb0dba8d663'/>
<id>urn:sha1:febdbfe8a91ce0d11939d4940b592eb0dba8d663</id>
<content type='text'>
Since the smp_mb__{before,after}*() ops are fundamentally dependent on
how an arch can implement atomics it doesn't make sense to have 3
variants of them. They must all be the same.

Furthermore, the 3 variants suggest they're only valid for those 3
atomic ops, while we have many more where they could be applied.

So move away from
smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}() and reduce the
interface to just the two: smp_mb__{before,after}_atomic().

This patch prepares the way by introducing default implementations in
asm-generic/barrier.h that default to a full barrier and providing
__deprecated inlines for the previous 6 barriers if they're not
provided by the arch.

This should allow for a mostly painless transition (lots of deprecated
warns in the interim).

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/n/tip-wr59327qdyi9mbzn6x937s4e@git.kernel.org
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: "Chen, Gong" &lt;gong.chen@linux.intel.com&gt;
Cc: John Sullivan &lt;jsrhbz@kanargh.force9.co.uk&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt;
Cc: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Cc: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>asm-generic: move cmpxchg*_local defs to cmpxchg.h</title>
<updated>2013-03-13T05:11:05Z</updated>
<author>
<name>Jonas Bonn</name>
<email>jonas@southpole.se</email>
</author>
<published>2013-02-28T05:37:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=00c30e0681bf5563c8670c0ab419886f56626430'/>
<id>urn:sha1:00c30e0681bf5563c8670c0ab419886f56626430</id>
<content type='text'>
asm/cmpxchg.h can be included on its own and needs to be self-consistent.
The definitions for the cmpxchg*_local macros, as such, need to be part
of this file.

This fixes a build issue on OpenRISC since the system.h smashing patch
96f951edb1f1bdbbc99b0cd458f9808bb83d58ae that introdued the direct inclusion
asm/cmpxchg.h into linux/llist.h.

CC: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Jonas Bonn &lt;jonas@southpole.se&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>Remove all #inclusions of asm/system.h</title>
<updated>2012-03-28T17:30:03Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-03-28T17:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ffc93f203c18a70623f21950f1dd473c9ec48cd'/>
<id>urn:sha1:9ffc93f203c18a70623f21950f1dd473c9ec48cd</id>
<content type='text'>
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*&lt;asm/system[.]h&gt;.*\n!!' `grep -Irl '^#\s*include\s*&lt;asm/system[.]h&gt;' *`

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h</title>
<updated>2012-03-28T17:30:03Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-03-28T17:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34484277b173d0af1bb00532a264940b57920429'/>
<id>urn:sha1:34484277b173d0af1bb00532a264940b57920429</id>
<content type='text'>
Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h as all arch
files that #include the former also #include the latter.  See:

	grep -rl asm-generic/cmpxchg-local[.]h arch/ | sort &gt; b
	grep -rl asm-generic/cmpxchg[.]h arch/ | sort &gt; a
	comm a b

This simplifies the disintegration of asm-generic/system.h for arches that
don't have their own.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>asm-generic/atomic.h: allow SMP peeps to leverage this</title>
<updated>2011-07-26T23:49:48Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-07-26T23:09:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7505cb60c2d26301630b052852d484decf07aef1'/>
<id>urn:sha1:7505cb60c2d26301630b052852d484decf07aef1</id>
<content type='text'>
Only a few core funcs need to be implemented for SMP systems, so allow the
arches to override them while getting the rest for free.

At least, this is enough to allow the Blackfin SMP port to use things.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: Arun Sharma &lt;asharma@fb.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>asm-generic/atomic.h: add atomic_set_mask() helper</title>
<updated>2011-07-26T23:49:48Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-07-26T23:09:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=00b3c28bd753afb46fb26b2f9e21dd27dacd80d4'/>
<id>urn:sha1:00b3c28bd753afb46fb26b2f9e21dd27dacd80d4</id>
<content type='text'>
Since arches are expected to implement this guy, add a common version for
people the same way as atomic_clear_mask is handled.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: Arun Sharma &lt;asharma@fb.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>asm-generic/atomic.h: fix type used in atomic_clear_mask</title>
<updated>2011-07-26T23:49:47Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-07-26T23:09:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6081bd3f8152cdd3d857f55631bbb4b72182b82'/>
<id>urn:sha1:f6081bd3f8152cdd3d857f55631bbb4b72182b82</id>
<content type='text'>
The atomic helpers are supposed to take an atomic_t pointer, not a random
unsigned long pointer.  So convert atomic_clear_mask over.

While we're here, also add some nice documentation to the func.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: Arun Sharma &lt;asharma@fb.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>asm-generic/atomic.h: simplify inc/dec test helpers</title>
<updated>2011-07-26T23:49:47Z</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-07-26T23:09:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3eea44ea753923c6af90be808426ecddc482de61'/>
<id>urn:sha1:3eea44ea753923c6af90be808426ecddc482de61</id>
<content type='text'>
We already declared inc/dec helpers, so we don't need to call the
atomic_{add,sub}_return funcs directly.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: Arun Sharma &lt;asharma@fb.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
