hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/ia64/include/asm/atomic.h
....@@ -19,7 +19,6 @@
1919 #include <asm/barrier.h>
2020
2121
22
-#define ATOMIC_INIT(i) { (i) }
2322 #define ATOMIC64_INIT(i) { (i) }
2423
2524 #define atomic_read(v) READ_ONCE((v)->counter)
....@@ -124,10 +123,10 @@
124123 #undef ATOMIC_OP
125124
126125 #define ATOMIC64_OP(op, c_op) \
127
-static __inline__ long \
128
-ia64_atomic64_##op (__s64 i, atomic64_t *v) \
126
+static __inline__ s64 \
127
+ia64_atomic64_##op (s64 i, atomic64_t *v) \
129128 { \
130
- __s64 old, new; \
129
+ s64 old, new; \
131130 CMPXCHG_BUGCHECK_DECL \
132131 \
133132 do { \
....@@ -139,10 +138,10 @@
139138 }
140139
141140 #define ATOMIC64_FETCH_OP(op, c_op) \
142
-static __inline__ long \
143
-ia64_atomic64_fetch_##op (__s64 i, atomic64_t *v) \
141
+static __inline__ s64 \
142
+ia64_atomic64_fetch_##op (s64 i, atomic64_t *v) \
144143 { \
145
- __s64 old, new; \
144
+ s64 old, new; \
146145 CMPXCHG_BUGCHECK_DECL \
147146 \
148147 do { \
....@@ -162,7 +161,7 @@
162161
163162 #define atomic64_add_return(i,v) \
164163 ({ \
165
- long __ia64_aar_i = (i); \
164
+ s64 __ia64_aar_i = (i); \
166165 __ia64_atomic_const(i) \
167166 ? ia64_fetch_and_add(__ia64_aar_i, &(v)->counter) \
168167 : ia64_atomic64_add(__ia64_aar_i, v); \
....@@ -170,7 +169,7 @@
170169
171170 #define atomic64_sub_return(i,v) \
172171 ({ \
173
- long __ia64_asr_i = (i); \
172
+ s64 __ia64_asr_i = (i); \
174173 __ia64_atomic_const(i) \
175174 ? ia64_fetch_and_add(-__ia64_asr_i, &(v)->counter) \
176175 : ia64_atomic64_sub(__ia64_asr_i, v); \
....@@ -178,7 +177,7 @@
178177
179178 #define atomic64_fetch_add(i,v) \
180179 ({ \
181
- long __ia64_aar_i = (i); \
180
+ s64 __ia64_aar_i = (i); \
182181 __ia64_atomic_const(i) \
183182 ? ia64_fetchadd(__ia64_aar_i, &(v)->counter, acq) \
184183 : ia64_atomic64_fetch_add(__ia64_aar_i, v); \
....@@ -186,7 +185,7 @@
186185
187186 #define atomic64_fetch_sub(i,v) \
188187 ({ \
189
- long __ia64_asr_i = (i); \
188
+ s64 __ia64_asr_i = (i); \
190189 __ia64_atomic_const(i) \
191190 ? ia64_fetchadd(-__ia64_asr_i, &(v)->counter, acq) \
192191 : ia64_atomic64_fetch_sub(__ia64_asr_i, v); \