Paul Mackerras
09d4e0edd4
lib: Provide generic atomic64_t implementation
...
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 <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-06-15 13:27:38 +10:00
..
2009-06-11 21:02:17 +02:00
2009-06-15 13:27:38 +10:00
2009-06-12 11:32:58 +02:00
2009-06-11 21:02:49 +02:00
2008-12-09 02:27:39 -05:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:31 +02:00
2009-06-11 21:02:14 +02:00
2009-05-06 16:36:09 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:51 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:37 +02:00
2008-07-26 12:00:03 -07:00
2009-06-11 21:02:42 +02:00
2009-06-11 21:02:37 +02:00
2009-03-26 18:14:14 +01:00
2009-06-11 21:02:17 +02:00
2009-04-02 19:04:51 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:42 +02:00
2009-06-11 21:02:14 +02:00
2009-06-11 21:02:14 +02:00
2009-06-11 21:02:49 +02:00
2008-08-12 16:07:31 -07:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:16 +02:00
2009-06-11 21:02:14 +02:00
2008-10-27 11:39:03 +01:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:37 +02:00
2009-05-18 08:34:08 -07:00
2009-01-06 15:59:10 -08:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2008-10-23 09:18:20 -07:00
2008-10-23 09:18:20 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2008-07-26 12:00:03 -07:00
2009-06-11 21:02:22 +02:00
2009-04-21 19:40:00 -07:00
2009-06-11 21:02:50 +02:00
2008-07-28 16:30:21 -07:00
2009-03-29 23:36:01 -07:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:18 +02:00
2009-06-11 21:02:37 +02:00
2009-01-16 14:19:14 +01:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-04-13 15:04:30 -07:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2009-03-26 18:14:21 +01:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2008-09-05 14:39:38 -07:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:01:52 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:42 +02:00
2009-06-11 21:02:50 +02:00
2009-03-30 22:05:17 +10:30
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:17 +02:00
2009-06-11 21:02:50 +02:00
2009-06-11 21:02:15 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:16 +02:00
2009-06-11 21:02:37 +02:00
2009-06-11 21:02:42 +02:00
2009-06-14 14:12:18 -07:00