aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Fritzsche <peter.fritzsche@gmx.de>2010-05-24 17:33:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-25 11:07:03 -0400
commit37682177af68478fa83429b735fa16913c2fbb2b (patch)
tree989ad96f1e5ca0b47e1a44111e1eb110a33a79eb /include
parentfc62f2f19edf46c9bdbd1a54725b56b18c43e94f (diff)
asm-generic: don't warn that atomic_t is only 24 bit
32-bit Sparc used to only allow usage of 24-bit of it's atomic_t type. This was corrected with linux 2.6.3 when Keith M Wesolowski changed the implementation to use the parisc approach of having an array of spinlocks to protect the atomic_t. These warnings were also removed from the sparc implementation when the new implementation was merged in BKrev:402e4949VThdc6D3iaosSFUgabMfvw, but the warning still remained in some other places without any 24-bit-only atomic_t implementation inside the kernel. We should remove these warnings to allow users to rely on the full 32-bit range of atomic_t. Signed-off-by: Peter Fritzsche <peter.fritzsche@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/atomic.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
index c33749f95b32..058129e9b04c 100644
--- a/include/asm-generic/atomic.h
+++ b/include/asm-generic/atomic.h
@@ -30,8 +30,7 @@
30 * atomic_read - read atomic variable 30 * atomic_read - read atomic variable
31 * @v: pointer of type atomic_t 31 * @v: pointer of type atomic_t
32 * 32 *
33 * Atomically reads the value of @v. Note that the guaranteed 33 * Atomically reads the value of @v.
34 * useful range of an atomic_t is only 24 bits.
35 */ 34 */
36#define atomic_read(v) (*(volatile int *)&(v)->counter) 35#define atomic_read(v) (*(volatile int *)&(v)->counter)
37 36
@@ -40,8 +39,7 @@
40 * @v: pointer of type atomic_t 39 * @v: pointer of type atomic_t
41 * @i: required value 40 * @i: required value
42 * 41 *
43 * Atomically sets the value of @v to @i. Note that the guaranteed 42 * Atomically sets the value of @v to @i.
44 * useful range of an atomic_t is only 24 bits.
45 */ 43 */
46#define atomic_set(v, i) (((v)->counter) = (i)) 44#define atomic_set(v, i) (((v)->counter) = (i))
47 45
@@ -53,7 +51,6 @@
53 * @v: pointer of type atomic_t 51 * @v: pointer of type atomic_t
54 * 52 *
55 * Atomically adds @i to @v and returns the result 53 * Atomically adds @i to @v and returns the result
56 * Note that the guaranteed useful range of an atomic_t is only 24 bits.
57 */ 54 */
58static inline int atomic_add_return(int i, atomic_t *v) 55static inline int atomic_add_return(int i, atomic_t *v)
59{ 56{
@@ -75,7 +72,6 @@ static inline int atomic_add_return(int i, atomic_t *v)
75 * @v: pointer of type atomic_t 72 * @v: pointer of type atomic_t
76 * 73 *
77 * Atomically subtracts @i from @v and returns the result 74 * Atomically subtracts @i from @v and returns the result
78 * Note that the guaranteed useful range of an atomic_t is only 24 bits.
79 */ 75 */
80static inline int atomic_sub_return(int i, atomic_t *v) 76static inline int atomic_sub_return(int i, atomic_t *v)
81{ 77{