<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/atomic64.c, branch v3.7-rc7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/lib/atomic64.c?h=v3.7-rc7</id>
<link rel='self' href='https://git.amat.us/linux/atom/lib/atomic64.c?h=v3.7-rc7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-03-07T20:04:04Z</updated>
<entry>
<title>lib: reduce the use of module.h wherever possible</title>
<updated>2012-03-07T20:04:04Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-11-17T02:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8bc3bcc93a2b4e47d5d410146f6546bca6171663'/>
<id>urn:sha1:8bc3bcc93a2b4e47d5d410146f6546bca6171663</id>
<content type='text'>
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map
them onto including export.h -- or if the file isn't even
using those, then just delete the include.  Fix up any implicit
include dependencies that were being masked by module.h along
the way.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>lib: atomic64: Change the type of local lock to raw_spinlock_t</title>
<updated>2011-09-14T11:14:11Z</updated>
<author>
<name>Yong Zhang</name>
<email>yong.zhang0@gmail.com</email>
</author>
<published>2011-09-14T07:49:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cb475de3d12df6912bc95048202ae8c280d4cad5'/>
<id>urn:sha1:cb475de3d12df6912bc95048202ae8c280d4cad5</id>
<content type='text'>
There are still some leftovers of commit f59ca058
[locking, lib/atomic64: Annotate atomic64_lock::lock as raw]

[ tglx: Seems I picked the wrong version of that patch :( ]

Signed-off-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Shan Hai &lt;haishan.bai@gmail.com&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Link: http://lkml.kernel.org/r/20110914074924.GA16096@zhy
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>locking, lib/atomic64: Annotate atomic64_lock::lock as raw</title>
<updated>2011-09-13T09:12:22Z</updated>
<author>
<name>Shan Hai</name>
<email>haishan.bai@gmail.com</email>
</author>
<published>2011-09-01T03:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f59ca05871a055a73f8e626f2d868f0da248e22c'/>
<id>urn:sha1:f59ca05871a055a73f8e626f2d868f0da248e22c</id>
<content type='text'>
The spinlock protected atomic64 operations must be irq safe as they
are used in hard interrupt context and cannot be preempted on -rt:

 NIP [c068b218] rt_spin_lock_slowlock+0x78/0x3a8
  LR [c068b1e0] rt_spin_lock_slowlock+0x40/0x3a8
 Call Trace:
  [eb459b90] [c068b1e0] rt_spin_lock_slowlock+0x40/0x3a8 (unreliable)
  [eb459c20] [c068bdb0] rt_spin_lock+0x40/0x98
  [eb459c40] [c03d2a14] atomic64_read+0x48/0x84
  [eb459c60] [c001aaf4] perf_event_interrupt+0xec/0x28c
  [eb459d10] [c0010138] performance_monitor_exception+0x7c/0x150
  [eb459d30] [c0014170] ret_from_except_full+0x0/0x4c

So annotate it.

In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.

Signed-off-by: Shan Hai &lt;haishan.bai@gmail.com&gt;
Reviewed-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>atomic: use &lt;linux/atomic.h&gt;</title>
<updated>2011-07-26T23:49:47Z</updated>
<author>
<name>Arun Sharma</name>
<email>asharma@fb.com</email>
</author>
<published>2011-07-26T23:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60063497a95e716c9a689af3be2687d261f115b4'/>
<id>urn:sha1:60063497a95e716c9a689af3be2687d261f115b4</id>
<content type='text'>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&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>lib: Fix atomic64_add_unless return value convention</title>
<updated>2010-03-01T19:38:46Z</updated>
<author>
<name>Luca Barbieri</name>
<email>luca@luca-barbieri.com</email>
</author>
<published>2010-03-01T18:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=97577896f6b9c056fa0a5e9f6a608110cb3dcd33'/>
<id>urn:sha1:97577896f6b9c056fa0a5e9f6a608110cb3dcd33</id>
<content type='text'>
atomic64_add_unless must return 1 if it perfomed the add and 0 otherwise.
The generic implementation did the opposite thing.

Reported-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Confirmed-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Luca Barbieri &lt;luca@luca-barbieri.com&gt;
LKML-Reference: &lt;1267469749-11878-4-git-send-email-luca@luca-barbieri.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
<entry>
<title>lib: export generic atomic64_t functions</title>
<updated>2009-07-30T02:10:35Z</updated>
<author>
<name>Roland Dreier</name>
<email>rdreier@cisco.com</email>
</author>
<published>2009-07-29T22:04:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3fc7b4b220c7e830a5b3ce0ea5f85a635e0c50f0'/>
<id>urn:sha1:3fc7b4b220c7e830a5b3ce0ea5f85a635e0c50f0</id>
<content type='text'>
The generic atomic64_t implementation in lib/ did not export the functions
it defined, which means that modules that use atomic64_t would not link on
platforms (such as 32-bit powerpc).  For example, trying to build a kernel
with CONFIG_NET_RDS on such a platform would fail with:

    ERROR: "atomic64_read" [net/rds/rds.ko] undefined!
    ERROR: "atomic64_set" [net/rds/rds.ko] undefined!

Fix this by exporting the atomic64_t functions to modules.  (I export the
entire API even if it's not all currently used by in-tree modules to avoid
having to continue fixing this in dribs and drabs)

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
Acked-by: Paul Mackerras &lt;paulus@samba.org&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>lib: Provide generic atomic64_t implementation</title>
<updated>2009-06-15T03:27:38Z</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2009-06-12T21:10:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09d4e0edd4614e787393acc582ac701c6ec3565b'/>
<id>urn:sha1:09d4e0edd4614e787393acc582ac701c6ec3565b</id>
<content type='text'>
Many processor architectures have no 64-bit atomic instructions, but
we need atomic64_t in order to support the perf_counter subsystem.

This adds an implementation of 64-bit atomic operations using hashed
spinlocks to provide atomicity.  For each atomic operation, the address
of the atomic64_t variable is hashed to an index into an array of 16
spinlocks.  That spinlock is taken (with interrupts disabled) around the
operation, which can then be coded non-atomically within the lock.

On UP, all the spinlock manipulation goes away and we simply disable
interrupts around each operation.  In fact gcc eliminates the whole
atomic64_lock variable as well.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
</feed>
