Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

locking/atomic: scripts: build raw_atomic_long*() directly

Now that arch_atomic*() usage is limited to the atomic headers, we no
longer have any users of arch_atomic_long_*(), and can generate
raw_atomic_long_*() directly.

Generate the raw_atomic_long_*() ops directly.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230605070124.3741859-20-mark.rutland@arm.com

authored by

Mark Rutland and committed by
Peter Zijlstra
1815da17 0f613bfa

+345 -859
+1 -1
include/linux/atomic.h
··· 78 78 }) 79 79 80 80 #include <linux/atomic/atomic-arch-fallback.h> 81 - #include <linux/atomic/atomic-long.h> 82 81 #include <linux/atomic/atomic-raw.h> 82 + #include <linux/atomic/atomic-long.h> 83 83 #include <linux/atomic/atomic-instrumented.h> 84 84 85 85 #endif /* _LINUX_ATOMIC_H */
+341 -341
include/linux/atomic/atomic-long.h
··· 24 24 #ifdef CONFIG_64BIT 25 25 26 26 static __always_inline long 27 - arch_atomic_long_read(const atomic_long_t *v) 27 + raw_atomic_long_read(const atomic_long_t *v) 28 28 { 29 - return arch_atomic64_read(v); 29 + return raw_atomic64_read(v); 30 30 } 31 31 32 32 static __always_inline long 33 - arch_atomic_long_read_acquire(const atomic_long_t *v) 33 + raw_atomic_long_read_acquire(const atomic_long_t *v) 34 34 { 35 - return arch_atomic64_read_acquire(v); 35 + return raw_atomic64_read_acquire(v); 36 36 } 37 37 38 38 static __always_inline void 39 - arch_atomic_long_set(atomic_long_t *v, long i) 39 + raw_atomic_long_set(atomic_long_t *v, long i) 40 40 { 41 - arch_atomic64_set(v, i); 41 + raw_atomic64_set(v, i); 42 42 } 43 43 44 44 static __always_inline void 45 - arch_atomic_long_set_release(atomic_long_t *v, long i) 45 + raw_atomic_long_set_release(atomic_long_t *v, long i) 46 46 { 47 - arch_atomic64_set_release(v, i); 47 + raw_atomic64_set_release(v, i); 48 48 } 49 49 50 50 static __always_inline void 51 - arch_atomic_long_add(long i, atomic_long_t *v) 51 + raw_atomic_long_add(long i, atomic_long_t *v) 52 52 { 53 - arch_atomic64_add(i, v); 53 + raw_atomic64_add(i, v); 54 54 } 55 55 56 56 static __always_inline long 57 - arch_atomic_long_add_return(long i, atomic_long_t *v) 57 + raw_atomic_long_add_return(long i, atomic_long_t *v) 58 58 { 59 - return arch_atomic64_add_return(i, v); 59 + return raw_atomic64_add_return(i, v); 60 60 } 61 61 62 62 static __always_inline long 63 - arch_atomic_long_add_return_acquire(long i, atomic_long_t *v) 63 + raw_atomic_long_add_return_acquire(long i, atomic_long_t *v) 64 64 { 65 - return arch_atomic64_add_return_acquire(i, v); 65 + return raw_atomic64_add_return_acquire(i, v); 66 66 } 67 67 68 68 static __always_inline long 69 - arch_atomic_long_add_return_release(long i, atomic_long_t *v) 69 + raw_atomic_long_add_return_release(long i, atomic_long_t *v) 70 70 { 71 - return arch_atomic64_add_return_release(i, v); 71 + return raw_atomic64_add_return_release(i, v); 72 72 } 73 73 74 74 static __always_inline long 75 - arch_atomic_long_add_return_relaxed(long i, atomic_long_t *v) 75 + raw_atomic_long_add_return_relaxed(long i, atomic_long_t *v) 76 76 { 77 - return arch_atomic64_add_return_relaxed(i, v); 77 + return raw_atomic64_add_return_relaxed(i, v); 78 78 } 79 79 80 80 static __always_inline long 81 - arch_atomic_long_fetch_add(long i, atomic_long_t *v) 81 + raw_atomic_long_fetch_add(long i, atomic_long_t *v) 82 82 { 83 - return arch_atomic64_fetch_add(i, v); 83 + return raw_atomic64_fetch_add(i, v); 84 84 } 85 85 86 86 static __always_inline long 87 - arch_atomic_long_fetch_add_acquire(long i, atomic_long_t *v) 87 + raw_atomic_long_fetch_add_acquire(long i, atomic_long_t *v) 88 88 { 89 - return arch_atomic64_fetch_add_acquire(i, v); 89 + return raw_atomic64_fetch_add_acquire(i, v); 90 90 } 91 91 92 92 static __always_inline long 93 - arch_atomic_long_fetch_add_release(long i, atomic_long_t *v) 93 + raw_atomic_long_fetch_add_release(long i, atomic_long_t *v) 94 94 { 95 - return arch_atomic64_fetch_add_release(i, v); 95 + return raw_atomic64_fetch_add_release(i, v); 96 96 } 97 97 98 98 static __always_inline long 99 - arch_atomic_long_fetch_add_relaxed(long i, atomic_long_t *v) 99 + raw_atomic_long_fetch_add_relaxed(long i, atomic_long_t *v) 100 100 { 101 - return arch_atomic64_fetch_add_relaxed(i, v); 101 + return raw_atomic64_fetch_add_relaxed(i, v); 102 102 } 103 103 104 104 static __always_inline void 105 - arch_atomic_long_sub(long i, atomic_long_t *v) 105 + raw_atomic_long_sub(long i, atomic_long_t *v) 106 106 { 107 - arch_atomic64_sub(i, v); 107 + raw_atomic64_sub(i, v); 108 108 } 109 109 110 110 static __always_inline long 111 - arch_atomic_long_sub_return(long i, atomic_long_t *v) 111 + raw_atomic_long_sub_return(long i, atomic_long_t *v) 112 112 { 113 - return arch_atomic64_sub_return(i, v); 113 + return raw_atomic64_sub_return(i, v); 114 114 } 115 115 116 116 static __always_inline long 117 - arch_atomic_long_sub_return_acquire(long i, atomic_long_t *v) 117 + raw_atomic_long_sub_return_acquire(long i, atomic_long_t *v) 118 118 { 119 - return arch_atomic64_sub_return_acquire(i, v); 119 + return raw_atomic64_sub_return_acquire(i, v); 120 120 } 121 121 122 122 static __always_inline long 123 - arch_atomic_long_sub_return_release(long i, atomic_long_t *v) 123 + raw_atomic_long_sub_return_release(long i, atomic_long_t *v) 124 124 { 125 - return arch_atomic64_sub_return_release(i, v); 125 + return raw_atomic64_sub_return_release(i, v); 126 126 } 127 127 128 128 static __always_inline long 129 - arch_atomic_long_sub_return_relaxed(long i, atomic_long_t *v) 129 + raw_atomic_long_sub_return_relaxed(long i, atomic_long_t *v) 130 130 { 131 - return arch_atomic64_sub_return_relaxed(i, v); 131 + return raw_atomic64_sub_return_relaxed(i, v); 132 132 } 133 133 134 134 static __always_inline long 135 - arch_atomic_long_fetch_sub(long i, atomic_long_t *v) 135 + raw_atomic_long_fetch_sub(long i, atomic_long_t *v) 136 136 { 137 - return arch_atomic64_fetch_sub(i, v); 137 + return raw_atomic64_fetch_sub(i, v); 138 138 } 139 139 140 140 static __always_inline long 141 - arch_atomic_long_fetch_sub_acquire(long i, atomic_long_t *v) 141 + raw_atomic_long_fetch_sub_acquire(long i, atomic_long_t *v) 142 142 { 143 - return arch_atomic64_fetch_sub_acquire(i, v); 143 + return raw_atomic64_fetch_sub_acquire(i, v); 144 144 } 145 145 146 146 static __always_inline long 147 - arch_atomic_long_fetch_sub_release(long i, atomic_long_t *v) 147 + raw_atomic_long_fetch_sub_release(long i, atomic_long_t *v) 148 148 { 149 - return arch_atomic64_fetch_sub_release(i, v); 149 + return raw_atomic64_fetch_sub_release(i, v); 150 150 } 151 151 152 152 static __always_inline long 153 - arch_atomic_long_fetch_sub_relaxed(long i, atomic_long_t *v) 153 + raw_atomic_long_fetch_sub_relaxed(long i, atomic_long_t *v) 154 154 { 155 - return arch_atomic64_fetch_sub_relaxed(i, v); 155 + return raw_atomic64_fetch_sub_relaxed(i, v); 156 156 } 157 157 158 158 static __always_inline void 159 - arch_atomic_long_inc(atomic_long_t *v) 159 + raw_atomic_long_inc(atomic_long_t *v) 160 160 { 161 - arch_atomic64_inc(v); 161 + raw_atomic64_inc(v); 162 162 } 163 163 164 164 static __always_inline long 165 - arch_atomic_long_inc_return(atomic_long_t *v) 165 + raw_atomic_long_inc_return(atomic_long_t *v) 166 166 { 167 - return arch_atomic64_inc_return(v); 167 + return raw_atomic64_inc_return(v); 168 168 } 169 169 170 170 static __always_inline long 171 - arch_atomic_long_inc_return_acquire(atomic_long_t *v) 171 + raw_atomic_long_inc_return_acquire(atomic_long_t *v) 172 172 { 173 - return arch_atomic64_inc_return_acquire(v); 173 + return raw_atomic64_inc_return_acquire(v); 174 174 } 175 175 176 176 static __always_inline long 177 - arch_atomic_long_inc_return_release(atomic_long_t *v) 177 + raw_atomic_long_inc_return_release(atomic_long_t *v) 178 178 { 179 - return arch_atomic64_inc_return_release(v); 179 + return raw_atomic64_inc_return_release(v); 180 180 } 181 181 182 182 static __always_inline long 183 - arch_atomic_long_inc_return_relaxed(atomic_long_t *v) 183 + raw_atomic_long_inc_return_relaxed(atomic_long_t *v) 184 184 { 185 - return arch_atomic64_inc_return_relaxed(v); 185 + return raw_atomic64_inc_return_relaxed(v); 186 186 } 187 187 188 188 static __always_inline long 189 - arch_atomic_long_fetch_inc(atomic_long_t *v) 189 + raw_atomic_long_fetch_inc(atomic_long_t *v) 190 190 { 191 - return arch_atomic64_fetch_inc(v); 191 + return raw_atomic64_fetch_inc(v); 192 192 } 193 193 194 194 static __always_inline long 195 - arch_atomic_long_fetch_inc_acquire(atomic_long_t *v) 195 + raw_atomic_long_fetch_inc_acquire(atomic_long_t *v) 196 196 { 197 - return arch_atomic64_fetch_inc_acquire(v); 197 + return raw_atomic64_fetch_inc_acquire(v); 198 198 } 199 199 200 200 static __always_inline long 201 - arch_atomic_long_fetch_inc_release(atomic_long_t *v) 201 + raw_atomic_long_fetch_inc_release(atomic_long_t *v) 202 202 { 203 - return arch_atomic64_fetch_inc_release(v); 203 + return raw_atomic64_fetch_inc_release(v); 204 204 } 205 205 206 206 static __always_inline long 207 - arch_atomic_long_fetch_inc_relaxed(atomic_long_t *v) 207 + raw_atomic_long_fetch_inc_relaxed(atomic_long_t *v) 208 208 { 209 - return arch_atomic64_fetch_inc_relaxed(v); 209 + return raw_atomic64_fetch_inc_relaxed(v); 210 210 } 211 211 212 212 static __always_inline void 213 - arch_atomic_long_dec(atomic_long_t *v) 213 + raw_atomic_long_dec(atomic_long_t *v) 214 214 { 215 - arch_atomic64_dec(v); 215 + raw_atomic64_dec(v); 216 216 } 217 217 218 218 static __always_inline long 219 - arch_atomic_long_dec_return(atomic_long_t *v) 219 + raw_atomic_long_dec_return(atomic_long_t *v) 220 220 { 221 - return arch_atomic64_dec_return(v); 221 + return raw_atomic64_dec_return(v); 222 222 } 223 223 224 224 static __always_inline long 225 - arch_atomic_long_dec_return_acquire(atomic_long_t *v) 225 + raw_atomic_long_dec_return_acquire(atomic_long_t *v) 226 226 { 227 - return arch_atomic64_dec_return_acquire(v); 227 + return raw_atomic64_dec_return_acquire(v); 228 228 } 229 229 230 230 static __always_inline long 231 - arch_atomic_long_dec_return_release(atomic_long_t *v) 231 + raw_atomic_long_dec_return_release(atomic_long_t *v) 232 232 { 233 - return arch_atomic64_dec_return_release(v); 233 + return raw_atomic64_dec_return_release(v); 234 234 } 235 235 236 236 static __always_inline long 237 - arch_atomic_long_dec_return_relaxed(atomic_long_t *v) 237 + raw_atomic_long_dec_return_relaxed(atomic_long_t *v) 238 238 { 239 - return arch_atomic64_dec_return_relaxed(v); 239 + return raw_atomic64_dec_return_relaxed(v); 240 240 } 241 241 242 242 static __always_inline long 243 - arch_atomic_long_fetch_dec(atomic_long_t *v) 243 + raw_atomic_long_fetch_dec(atomic_long_t *v) 244 244 { 245 - return arch_atomic64_fetch_dec(v); 245 + return raw_atomic64_fetch_dec(v); 246 246 } 247 247 248 248 static __always_inline long 249 - arch_atomic_long_fetch_dec_acquire(atomic_long_t *v) 249 + raw_atomic_long_fetch_dec_acquire(atomic_long_t *v) 250 250 { 251 - return arch_atomic64_fetch_dec_acquire(v); 251 + return raw_atomic64_fetch_dec_acquire(v); 252 252 } 253 253 254 254 static __always_inline long 255 - arch_atomic_long_fetch_dec_release(atomic_long_t *v) 255 + raw_atomic_long_fetch_dec_release(atomic_long_t *v) 256 256 { 257 - return arch_atomic64_fetch_dec_release(v); 257 + return raw_atomic64_fetch_dec_release(v); 258 258 } 259 259 260 260 static __always_inline long 261 - arch_atomic_long_fetch_dec_relaxed(atomic_long_t *v) 261 + raw_atomic_long_fetch_dec_relaxed(atomic_long_t *v) 262 262 { 263 - return arch_atomic64_fetch_dec_relaxed(v); 263 + return raw_atomic64_fetch_dec_relaxed(v); 264 264 } 265 265 266 266 static __always_inline void 267 - arch_atomic_long_and(long i, atomic_long_t *v) 267 + raw_atomic_long_and(long i, atomic_long_t *v) 268 268 { 269 - arch_atomic64_and(i, v); 269 + raw_atomic64_and(i, v); 270 270 } 271 271 272 272 static __always_inline long 273 - arch_atomic_long_fetch_and(long i, atomic_long_t *v) 273 + raw_atomic_long_fetch_and(long i, atomic_long_t *v) 274 274 { 275 - return arch_atomic64_fetch_and(i, v); 275 + return raw_atomic64_fetch_and(i, v); 276 276 } 277 277 278 278 static __always_inline long 279 - arch_atomic_long_fetch_and_acquire(long i, atomic_long_t *v) 279 + raw_atomic_long_fetch_and_acquire(long i, atomic_long_t *v) 280 280 { 281 - return arch_atomic64_fetch_and_acquire(i, v); 281 + return raw_atomic64_fetch_and_acquire(i, v); 282 282 } 283 283 284 284 static __always_inline long 285 - arch_atomic_long_fetch_and_release(long i, atomic_long_t *v) 285 + raw_atomic_long_fetch_and_release(long i, atomic_long_t *v) 286 286 { 287 - return arch_atomic64_fetch_and_release(i, v); 287 + return raw_atomic64_fetch_and_release(i, v); 288 288 } 289 289 290 290 static __always_inline long 291 - arch_atomic_long_fetch_and_relaxed(long i, atomic_long_t *v) 291 + raw_atomic_long_fetch_and_relaxed(long i, atomic_long_t *v) 292 292 { 293 - return arch_atomic64_fetch_and_relaxed(i, v); 293 + return raw_atomic64_fetch_and_relaxed(i, v); 294 294 } 295 295 296 296 static __always_inline void 297 - arch_atomic_long_andnot(long i, atomic_long_t *v) 297 + raw_atomic_long_andnot(long i, atomic_long_t *v) 298 298 { 299 - arch_atomic64_andnot(i, v); 299 + raw_atomic64_andnot(i, v); 300 300 } 301 301 302 302 static __always_inline long 303 - arch_atomic_long_fetch_andnot(long i, atomic_long_t *v) 303 + raw_atomic_long_fetch_andnot(long i, atomic_long_t *v) 304 304 { 305 - return arch_atomic64_fetch_andnot(i, v); 305 + return raw_atomic64_fetch_andnot(i, v); 306 306 } 307 307 308 308 static __always_inline long 309 - arch_atomic_long_fetch_andnot_acquire(long i, atomic_long_t *v) 309 + raw_atomic_long_fetch_andnot_acquire(long i, atomic_long_t *v) 310 310 { 311 - return arch_atomic64_fetch_andnot_acquire(i, v); 311 + return raw_atomic64_fetch_andnot_acquire(i, v); 312 312 } 313 313 314 314 static __always_inline long 315 - arch_atomic_long_fetch_andnot_release(long i, atomic_long_t *v) 315 + raw_atomic_long_fetch_andnot_release(long i, atomic_long_t *v) 316 316 { 317 - return arch_atomic64_fetch_andnot_release(i, v); 317 + return raw_atomic64_fetch_andnot_release(i, v); 318 318 } 319 319 320 320 static __always_inline long 321 - arch_atomic_long_fetch_andnot_relaxed(long i, atomic_long_t *v) 321 + raw_atomic_long_fetch_andnot_relaxed(long i, atomic_long_t *v) 322 322 { 323 - return arch_atomic64_fetch_andnot_relaxed(i, v); 323 + return raw_atomic64_fetch_andnot_relaxed(i, v); 324 324 } 325 325 326 326 static __always_inline void 327 - arch_atomic_long_or(long i, atomic_long_t *v) 327 + raw_atomic_long_or(long i, atomic_long_t *v) 328 328 { 329 - arch_atomic64_or(i, v); 329 + raw_atomic64_or(i, v); 330 330 } 331 331 332 332 static __always_inline long 333 - arch_atomic_long_fetch_or(long i, atomic_long_t *v) 333 + raw_atomic_long_fetch_or(long i, atomic_long_t *v) 334 334 { 335 - return arch_atomic64_fetch_or(i, v); 335 + return raw_atomic64_fetch_or(i, v); 336 336 } 337 337 338 338 static __always_inline long 339 - arch_atomic_long_fetch_or_acquire(long i, atomic_long_t *v) 339 + raw_atomic_long_fetch_or_acquire(long i, atomic_long_t *v) 340 340 { 341 - return arch_atomic64_fetch_or_acquire(i, v); 341 + return raw_atomic64_fetch_or_acquire(i, v); 342 342 } 343 343 344 344 static __always_inline long 345 - arch_atomic_long_fetch_or_release(long i, atomic_long_t *v) 345 + raw_atomic_long_fetch_or_release(long i, atomic_long_t *v) 346 346 { 347 - return arch_atomic64_fetch_or_release(i, v); 347 + return raw_atomic64_fetch_or_release(i, v); 348 348 } 349 349 350 350 static __always_inline long 351 - arch_atomic_long_fetch_or_relaxed(long i, atomic_long_t *v) 351 + raw_atomic_long_fetch_or_relaxed(long i, atomic_long_t *v) 352 352 { 353 - return arch_atomic64_fetch_or_relaxed(i, v); 353 + return raw_atomic64_fetch_or_relaxed(i, v); 354 354 } 355 355 356 356 static __always_inline void 357 - arch_atomic_long_xor(long i, atomic_long_t *v) 357 + raw_atomic_long_xor(long i, atomic_long_t *v) 358 358 { 359 - arch_atomic64_xor(i, v); 359 + raw_atomic64_xor(i, v); 360 360 } 361 361 362 362 static __always_inline long 363 - arch_atomic_long_fetch_xor(long i, atomic_long_t *v) 363 + raw_atomic_long_fetch_xor(long i, atomic_long_t *v) 364 364 { 365 - return arch_atomic64_fetch_xor(i, v); 365 + return raw_atomic64_fetch_xor(i, v); 366 366 } 367 367 368 368 static __always_inline long 369 - arch_atomic_long_fetch_xor_acquire(long i, atomic_long_t *v) 369 + raw_atomic_long_fetch_xor_acquire(long i, atomic_long_t *v) 370 370 { 371 - return arch_atomic64_fetch_xor_acquire(i, v); 371 + return raw_atomic64_fetch_xor_acquire(i, v); 372 372 } 373 373 374 374 static __always_inline long 375 - arch_atomic_long_fetch_xor_release(long i, atomic_long_t *v) 375 + raw_atomic_long_fetch_xor_release(long i, atomic_long_t *v) 376 376 { 377 - return arch_atomic64_fetch_xor_release(i, v); 377 + return raw_atomic64_fetch_xor_release(i, v); 378 378 } 379 379 380 380 static __always_inline long 381 - arch_atomic_long_fetch_xor_relaxed(long i, atomic_long_t *v) 381 + raw_atomic_long_fetch_xor_relaxed(long i, atomic_long_t *v) 382 382 { 383 - return arch_atomic64_fetch_xor_relaxed(i, v); 383 + return raw_atomic64_fetch_xor_relaxed(i, v); 384 384 } 385 385 386 386 static __always_inline long 387 - arch_atomic_long_xchg(atomic_long_t *v, long i) 387 + raw_atomic_long_xchg(atomic_long_t *v, long i) 388 388 { 389 - return arch_atomic64_xchg(v, i); 389 + return raw_atomic64_xchg(v, i); 390 390 } 391 391 392 392 static __always_inline long 393 - arch_atomic_long_xchg_acquire(atomic_long_t *v, long i) 393 + raw_atomic_long_xchg_acquire(atomic_long_t *v, long i) 394 394 { 395 - return arch_atomic64_xchg_acquire(v, i); 395 + return raw_atomic64_xchg_acquire(v, i); 396 396 } 397 397 398 398 static __always_inline long 399 - arch_atomic_long_xchg_release(atomic_long_t *v, long i) 399 + raw_atomic_long_xchg_release(atomic_long_t *v, long i) 400 400 { 401 - return arch_atomic64_xchg_release(v, i); 401 + return raw_atomic64_xchg_release(v, i); 402 402 } 403 403 404 404 static __always_inline long 405 - arch_atomic_long_xchg_relaxed(atomic_long_t *v, long i) 405 + raw_atomic_long_xchg_relaxed(atomic_long_t *v, long i) 406 406 { 407 - return arch_atomic64_xchg_relaxed(v, i); 407 + return raw_atomic64_xchg_relaxed(v, i); 408 408 } 409 409 410 410 static __always_inline long 411 - arch_atomic_long_cmpxchg(atomic_long_t *v, long old, long new) 411 + raw_atomic_long_cmpxchg(atomic_long_t *v, long old, long new) 412 412 { 413 - return arch_atomic64_cmpxchg(v, old, new); 413 + return raw_atomic64_cmpxchg(v, old, new); 414 414 } 415 415 416 416 static __always_inline long 417 - arch_atomic_long_cmpxchg_acquire(atomic_long_t *v, long old, long new) 417 + raw_atomic_long_cmpxchg_acquire(atomic_long_t *v, long old, long new) 418 418 { 419 - return arch_atomic64_cmpxchg_acquire(v, old, new); 419 + return raw_atomic64_cmpxchg_acquire(v, old, new); 420 420 } 421 421 422 422 static __always_inline long 423 - arch_atomic_long_cmpxchg_release(atomic_long_t *v, long old, long new) 423 + raw_atomic_long_cmpxchg_release(atomic_long_t *v, long old, long new) 424 424 { 425 - return arch_atomic64_cmpxchg_release(v, old, new); 425 + return raw_atomic64_cmpxchg_release(v, old, new); 426 426 } 427 427 428 428 static __always_inline long 429 - arch_atomic_long_cmpxchg_relaxed(atomic_long_t *v, long old, long new) 429 + raw_atomic_long_cmpxchg_relaxed(atomic_long_t *v, long old, long new) 430 430 { 431 - return arch_atomic64_cmpxchg_relaxed(v, old, new); 431 + return raw_atomic64_cmpxchg_relaxed(v, old, new); 432 432 } 433 433 434 434 static __always_inline bool 435 - arch_atomic_long_try_cmpxchg(atomic_long_t *v, long *old, long new) 435 + raw_atomic_long_try_cmpxchg(atomic_long_t *v, long *old, long new) 436 436 { 437 - return arch_atomic64_try_cmpxchg(v, (s64 *)old, new); 437 + return raw_atomic64_try_cmpxchg(v, (s64 *)old, new); 438 438 } 439 439 440 440 static __always_inline bool 441 - arch_atomic_long_try_cmpxchg_acquire(atomic_long_t *v, long *old, long new) 441 + raw_atomic_long_try_cmpxchg_acquire(atomic_long_t *v, long *old, long new) 442 442 { 443 - return arch_atomic64_try_cmpxchg_acquire(v, (s64 *)old, new); 443 + return raw_atomic64_try_cmpxchg_acquire(v, (s64 *)old, new); 444 444 } 445 445 446 446 static __always_inline bool 447 - arch_atomic_long_try_cmpxchg_release(atomic_long_t *v, long *old, long new) 447 + raw_atomic_long_try_cmpxchg_release(atomic_long_t *v, long *old, long new) 448 448 { 449 - return arch_atomic64_try_cmpxchg_release(v, (s64 *)old, new); 449 + return raw_atomic64_try_cmpxchg_release(v, (s64 *)old, new); 450 450 } 451 451 452 452 static __always_inline bool 453 - arch_atomic_long_try_cmpxchg_relaxed(atomic_long_t *v, long *old, long new) 453 + raw_atomic_long_try_cmpxchg_relaxed(atomic_long_t *v, long *old, long new) 454 454 { 455 - return arch_atomic64_try_cmpxchg_relaxed(v, (s64 *)old, new); 455 + return raw_atomic64_try_cmpxchg_relaxed(v, (s64 *)old, new); 456 456 } 457 457 458 458 static __always_inline bool 459 - arch_atomic_long_sub_and_test(long i, atomic_long_t *v) 459 + raw_atomic_long_sub_and_test(long i, atomic_long_t *v) 460 460 { 461 - return arch_atomic64_sub_and_test(i, v); 461 + return raw_atomic64_sub_and_test(i, v); 462 462 } 463 463 464 464 static __always_inline bool 465 - arch_atomic_long_dec_and_test(atomic_long_t *v) 465 + raw_atomic_long_dec_and_test(atomic_long_t *v) 466 466 { 467 - return arch_atomic64_dec_and_test(v); 467 + return raw_atomic64_dec_and_test(v); 468 468 } 469 469 470 470 static __always_inline bool 471 - arch_atomic_long_inc_and_test(atomic_long_t *v) 471 + raw_atomic_long_inc_and_test(atomic_long_t *v) 472 472 { 473 - return arch_atomic64_inc_and_test(v); 473 + return raw_atomic64_inc_and_test(v); 474 474 } 475 475 476 476 static __always_inline bool 477 - arch_atomic_long_add_negative(long i, atomic_long_t *v) 477 + raw_atomic_long_add_negative(long i, atomic_long_t *v) 478 478 { 479 - return arch_atomic64_add_negative(i, v); 479 + return raw_atomic64_add_negative(i, v); 480 480 } 481 481 482 482 static __always_inline bool 483 - arch_atomic_long_add_negative_acquire(long i, atomic_long_t *v) 483 + raw_atomic_long_add_negative_acquire(long i, atomic_long_t *v) 484 484 { 485 - return arch_atomic64_add_negative_acquire(i, v); 485 + return raw_atomic64_add_negative_acquire(i, v); 486 486 } 487 487 488 488 static __always_inline bool 489 - arch_atomic_long_add_negative_release(long i, atomic_long_t *v) 489 + raw_atomic_long_add_negative_release(long i, atomic_long_t *v) 490 490 { 491 - return arch_atomic64_add_negative_release(i, v); 491 + return raw_atomic64_add_negative_release(i, v); 492 492 } 493 493 494 494 static __always_inline bool 495 - arch_atomic_long_add_negative_relaxed(long i, atomic_long_t *v) 495 + raw_atomic_long_add_negative_relaxed(long i, atomic_long_t *v) 496 496 { 497 - return arch_atomic64_add_negative_relaxed(i, v); 497 + return raw_atomic64_add_negative_relaxed(i, v); 498 498 } 499 499 500 500 static __always_inline long 501 - arch_atomic_long_fetch_add_unless(atomic_long_t *v, long a, long u) 501 + raw_atomic_long_fetch_add_unless(atomic_long_t *v, long a, long u) 502 502 { 503 - return arch_atomic64_fetch_add_unless(v, a, u); 503 + return raw_atomic64_fetch_add_unless(v, a, u); 504 504 } 505 505 506 506 static __always_inline bool 507 - arch_atomic_long_add_unless(atomic_long_t *v, long a, long u) 507 + raw_atomic_long_add_unless(atomic_long_t *v, long a, long u) 508 508 { 509 - return arch_atomic64_add_unless(v, a, u); 509 + return raw_atomic64_add_unless(v, a, u); 510 510 } 511 511 512 512 static __always_inline bool 513 - arch_atomic_long_inc_not_zero(atomic_long_t *v) 513 + raw_atomic_long_inc_not_zero(atomic_long_t *v) 514 514 { 515 - return arch_atomic64_inc_not_zero(v); 515 + return raw_atomic64_inc_not_zero(v); 516 516 } 517 517 518 518 static __always_inline bool 519 - arch_atomic_long_inc_unless_negative(atomic_long_t *v) 519 + raw_atomic_long_inc_unless_negative(atomic_long_t *v) 520 520 { 521 - return arch_atomic64_inc_unless_negative(v); 521 + return raw_atomic64_inc_unless_negative(v); 522 522 } 523 523 524 524 static __always_inline bool 525 - arch_atomic_long_dec_unless_positive(atomic_long_t *v) 525 + raw_atomic_long_dec_unless_positive(atomic_long_t *v) 526 526 { 527 - return arch_atomic64_dec_unless_positive(v); 527 + return raw_atomic64_dec_unless_positive(v); 528 528 } 529 529 530 530 static __always_inline long 531 - arch_atomic_long_dec_if_positive(atomic_long_t *v) 531 + raw_atomic_long_dec_if_positive(atomic_long_t *v) 532 532 { 533 - return arch_atomic64_dec_if_positive(v); 533 + return raw_atomic64_dec_if_positive(v); 534 534 } 535 535 536 536 #else /* CONFIG_64BIT */ 537 537 538 538 static __always_inline long 539 - arch_atomic_long_read(const atomic_long_t *v) 539 + raw_atomic_long_read(const atomic_long_t *v) 540 540 { 541 - return arch_atomic_read(v); 541 + return raw_atomic_read(v); 542 542 } 543 543 544 544 static __always_inline long 545 - arch_atomic_long_read_acquire(const atomic_long_t *v) 545 + raw_atomic_long_read_acquire(const atomic_long_t *v) 546 546 { 547 - return arch_atomic_read_acquire(v); 547 + return raw_atomic_read_acquire(v); 548 548 } 549 549 550 550 static __always_inline void 551 - arch_atomic_long_set(atomic_long_t *v, long i) 551 + raw_atomic_long_set(atomic_long_t *v, long i) 552 552 { 553 - arch_atomic_set(v, i); 553 + raw_atomic_set(v, i); 554 554 } 555 555 556 556 static __always_inline void 557 - arch_atomic_long_set_release(atomic_long_t *v, long i) 557 + raw_atomic_long_set_release(atomic_long_t *v, long i) 558 558 { 559 - arch_atomic_set_release(v, i); 559 + raw_atomic_set_release(v, i); 560 560 } 561 561 562 562 static __always_inline void 563 - arch_atomic_long_add(long i, atomic_long_t *v) 563 + raw_atomic_long_add(long i, atomic_long_t *v) 564 564 { 565 - arch_atomic_add(i, v); 565 + raw_atomic_add(i, v); 566 566 } 567 567 568 568 static __always_inline long 569 - arch_atomic_long_add_return(long i, atomic_long_t *v) 569 + raw_atomic_long_add_return(long i, atomic_long_t *v) 570 570 { 571 - return arch_atomic_add_return(i, v); 571 + return raw_atomic_add_return(i, v); 572 572 } 573 573 574 574 static __always_inline long 575 - arch_atomic_long_add_return_acquire(long i, atomic_long_t *v) 575 + raw_atomic_long_add_return_acquire(long i, atomic_long_t *v) 576 576 { 577 - return arch_atomic_add_return_acquire(i, v); 577 + return raw_atomic_add_return_acquire(i, v); 578 578 } 579 579 580 580 static __always_inline long 581 - arch_atomic_long_add_return_release(long i, atomic_long_t *v) 581 + raw_atomic_long_add_return_release(long i, atomic_long_t *v) 582 582 { 583 - return arch_atomic_add_return_release(i, v); 583 + return raw_atomic_add_return_release(i, v); 584 584 } 585 585 586 586 static __always_inline long 587 - arch_atomic_long_add_return_relaxed(long i, atomic_long_t *v) 587 + raw_atomic_long_add_return_relaxed(long i, atomic_long_t *v) 588 588 { 589 - return arch_atomic_add_return_relaxed(i, v); 589 + return raw_atomic_add_return_relaxed(i, v); 590 590 } 591 591 592 592 static __always_inline long 593 - arch_atomic_long_fetch_add(long i, atomic_long_t *v) 593 + raw_atomic_long_fetch_add(long i, atomic_long_t *v) 594 594 { 595 - return arch_atomic_fetch_add(i, v); 595 + return raw_atomic_fetch_add(i, v); 596 596 } 597 597 598 598 static __always_inline long 599 - arch_atomic_long_fetch_add_acquire(long i, atomic_long_t *v) 599 + raw_atomic_long_fetch_add_acquire(long i, atomic_long_t *v) 600 600 { 601 - return arch_atomic_fetch_add_acquire(i, v); 601 + return raw_atomic_fetch_add_acquire(i, v); 602 602 } 603 603 604 604 static __always_inline long 605 - arch_atomic_long_fetch_add_release(long i, atomic_long_t *v) 605 + raw_atomic_long_fetch_add_release(long i, atomic_long_t *v) 606 606 { 607 - return arch_atomic_fetch_add_release(i, v); 607 + return raw_atomic_fetch_add_release(i, v); 608 608 } 609 609 610 610 static __always_inline long 611 - arch_atomic_long_fetch_add_relaxed(long i, atomic_long_t *v) 611 + raw_atomic_long_fetch_add_relaxed(long i, atomic_long_t *v) 612 612 { 613 - return arch_atomic_fetch_add_relaxed(i, v); 613 + return raw_atomic_fetch_add_relaxed(i, v); 614 614 } 615 615 616 616 static __always_inline void 617 - arch_atomic_long_sub(long i, atomic_long_t *v) 617 + raw_atomic_long_sub(long i, atomic_long_t *v) 618 618 { 619 - arch_atomic_sub(i, v); 619 + raw_atomic_sub(i, v); 620 620 } 621 621 622 622 static __always_inline long 623 - arch_atomic_long_sub_return(long i, atomic_long_t *v) 623 + raw_atomic_long_sub_return(long i, atomic_long_t *v) 624 624 { 625 - return arch_atomic_sub_return(i, v); 625 + return raw_atomic_sub_return(i, v); 626 626 } 627 627 628 628 static __always_inline long 629 - arch_atomic_long_sub_return_acquire(long i, atomic_long_t *v) 629 + raw_atomic_long_sub_return_acquire(long i, atomic_long_t *v) 630 630 { 631 - return arch_atomic_sub_return_acquire(i, v); 631 + return raw_atomic_sub_return_acquire(i, v); 632 632 } 633 633 634 634 static __always_inline long 635 - arch_atomic_long_sub_return_release(long i, atomic_long_t *v) 635 + raw_atomic_long_sub_return_release(long i, atomic_long_t *v) 636 636 { 637 - return arch_atomic_sub_return_release(i, v); 637 + return raw_atomic_sub_return_release(i, v); 638 638 } 639 639 640 640 static __always_inline long 641 - arch_atomic_long_sub_return_relaxed(long i, atomic_long_t *v) 641 + raw_atomic_long_sub_return_relaxed(long i, atomic_long_t *v) 642 642 { 643 - return arch_atomic_sub_return_relaxed(i, v); 643 + return raw_atomic_sub_return_relaxed(i, v); 644 644 } 645 645 646 646 static __always_inline long 647 - arch_atomic_long_fetch_sub(long i, atomic_long_t *v) 647 + raw_atomic_long_fetch_sub(long i, atomic_long_t *v) 648 648 { 649 - return arch_atomic_fetch_sub(i, v); 649 + return raw_atomic_fetch_sub(i, v); 650 650 } 651 651 652 652 static __always_inline long 653 - arch_atomic_long_fetch_sub_acquire(long i, atomic_long_t *v) 653 + raw_atomic_long_fetch_sub_acquire(long i, atomic_long_t *v) 654 654 { 655 - return arch_atomic_fetch_sub_acquire(i, v); 655 + return raw_atomic_fetch_sub_acquire(i, v); 656 656 } 657 657 658 658 static __always_inline long 659 - arch_atomic_long_fetch_sub_release(long i, atomic_long_t *v) 659 + raw_atomic_long_fetch_sub_release(long i, atomic_long_t *v) 660 660 { 661 - return arch_atomic_fetch_sub_release(i, v); 661 + return raw_atomic_fetch_sub_release(i, v); 662 662 } 663 663 664 664 static __always_inline long 665 - arch_atomic_long_fetch_sub_relaxed(long i, atomic_long_t *v) 665 + raw_atomic_long_fetch_sub_relaxed(long i, atomic_long_t *v) 666 666 { 667 - return arch_atomic_fetch_sub_relaxed(i, v); 667 + return raw_atomic_fetch_sub_relaxed(i, v); 668 668 } 669 669 670 670 static __always_inline void 671 - arch_atomic_long_inc(atomic_long_t *v) 671 + raw_atomic_long_inc(atomic_long_t *v) 672 672 { 673 - arch_atomic_inc(v); 673 + raw_atomic_inc(v); 674 674 } 675 675 676 676 static __always_inline long 677 - arch_atomic_long_inc_return(atomic_long_t *v) 677 + raw_atomic_long_inc_return(atomic_long_t *v) 678 678 { 679 - return arch_atomic_inc_return(v); 679 + return raw_atomic_inc_return(v); 680 680 } 681 681 682 682 static __always_inline long 683 - arch_atomic_long_inc_return_acquire(atomic_long_t *v) 683 + raw_atomic_long_inc_return_acquire(atomic_long_t *v) 684 684 { 685 - return arch_atomic_inc_return_acquire(v); 685 + return raw_atomic_inc_return_acquire(v); 686 686 } 687 687 688 688 static __always_inline long 689 - arch_atomic_long_inc_return_release(atomic_long_t *v) 689 + raw_atomic_long_inc_return_release(atomic_long_t *v) 690 690 { 691 - return arch_atomic_inc_return_release(v); 691 + return raw_atomic_inc_return_release(v); 692 692 } 693 693 694 694 static __always_inline long 695 - arch_atomic_long_inc_return_relaxed(atomic_long_t *v) 695 + raw_atomic_long_inc_return_relaxed(atomic_long_t *v) 696 696 { 697 - return arch_atomic_inc_return_relaxed(v); 697 + return raw_atomic_inc_return_relaxed(v); 698 698 } 699 699 700 700 static __always_inline long 701 - arch_atomic_long_fetch_inc(atomic_long_t *v) 701 + raw_atomic_long_fetch_inc(atomic_long_t *v) 702 702 { 703 - return arch_atomic_fetch_inc(v); 703 + return raw_atomic_fetch_inc(v); 704 704 } 705 705 706 706 static __always_inline long 707 - arch_atomic_long_fetch_inc_acquire(atomic_long_t *v) 707 + raw_atomic_long_fetch_inc_acquire(atomic_long_t *v) 708 708 { 709 - return arch_atomic_fetch_inc_acquire(v); 709 + return raw_atomic_fetch_inc_acquire(v); 710 710 } 711 711 712 712 static __always_inline long 713 - arch_atomic_long_fetch_inc_release(atomic_long_t *v) 713 + raw_atomic_long_fetch_inc_release(atomic_long_t *v) 714 714 { 715 - return arch_atomic_fetch_inc_release(v); 715 + return raw_atomic_fetch_inc_release(v); 716 716 } 717 717 718 718 static __always_inline long 719 - arch_atomic_long_fetch_inc_relaxed(atomic_long_t *v) 719 + raw_atomic_long_fetch_inc_relaxed(atomic_long_t *v) 720 720 { 721 - return arch_atomic_fetch_inc_relaxed(v); 721 + return raw_atomic_fetch_inc_relaxed(v); 722 722 } 723 723 724 724 static __always_inline void 725 - arch_atomic_long_dec(atomic_long_t *v) 725 + raw_atomic_long_dec(atomic_long_t *v) 726 726 { 727 - arch_atomic_dec(v); 727 + raw_atomic_dec(v); 728 728 } 729 729 730 730 static __always_inline long 731 - arch_atomic_long_dec_return(atomic_long_t *v) 731 + raw_atomic_long_dec_return(atomic_long_t *v) 732 732 { 733 - return arch_atomic_dec_return(v); 733 + return raw_atomic_dec_return(v); 734 734 } 735 735 736 736 static __always_inline long 737 - arch_atomic_long_dec_return_acquire(atomic_long_t *v) 737 + raw_atomic_long_dec_return_acquire(atomic_long_t *v) 738 738 { 739 - return arch_atomic_dec_return_acquire(v); 739 + return raw_atomic_dec_return_acquire(v); 740 740 } 741 741 742 742 static __always_inline long 743 - arch_atomic_long_dec_return_release(atomic_long_t *v) 743 + raw_atomic_long_dec_return_release(atomic_long_t *v) 744 744 { 745 - return arch_atomic_dec_return_release(v); 745 + return raw_atomic_dec_return_release(v); 746 746 } 747 747 748 748 static __always_inline long 749 - arch_atomic_long_dec_return_relaxed(atomic_long_t *v) 749 + raw_atomic_long_dec_return_relaxed(atomic_long_t *v) 750 750 { 751 - return arch_atomic_dec_return_relaxed(v); 751 + return raw_atomic_dec_return_relaxed(v); 752 752 } 753 753 754 754 static __always_inline long 755 - arch_atomic_long_fetch_dec(atomic_long_t *v) 755 + raw_atomic_long_fetch_dec(atomic_long_t *v) 756 756 { 757 - return arch_atomic_fetch_dec(v); 757 + return raw_atomic_fetch_dec(v); 758 758 } 759 759 760 760 static __always_inline long 761 - arch_atomic_long_fetch_dec_acquire(atomic_long_t *v) 761 + raw_atomic_long_fetch_dec_acquire(atomic_long_t *v) 762 762 { 763 - return arch_atomic_fetch_dec_acquire(v); 763 + return raw_atomic_fetch_dec_acquire(v); 764 764 } 765 765 766 766 static __always_inline long 767 - arch_atomic_long_fetch_dec_release(atomic_long_t *v) 767 + raw_atomic_long_fetch_dec_release(atomic_long_t *v) 768 768 { 769 - return arch_atomic_fetch_dec_release(v); 769 + return raw_atomic_fetch_dec_release(v); 770 770 } 771 771 772 772 static __always_inline long 773 - arch_atomic_long_fetch_dec_relaxed(atomic_long_t *v) 773 + raw_atomic_long_fetch_dec_relaxed(atomic_long_t *v) 774 774 { 775 - return arch_atomic_fetch_dec_relaxed(v); 775 + return raw_atomic_fetch_dec_relaxed(v); 776 776 } 777 777 778 778 static __always_inline void 779 - arch_atomic_long_and(long i, atomic_long_t *v) 779 + raw_atomic_long_and(long i, atomic_long_t *v) 780 780 { 781 - arch_atomic_and(i, v); 781 + raw_atomic_and(i, v); 782 782 } 783 783 784 784 static __always_inline long 785 - arch_atomic_long_fetch_and(long i, atomic_long_t *v) 785 + raw_atomic_long_fetch_and(long i, atomic_long_t *v) 786 786 { 787 - return arch_atomic_fetch_and(i, v); 787 + return raw_atomic_fetch_and(i, v); 788 788 } 789 789 790 790 static __always_inline long 791 - arch_atomic_long_fetch_and_acquire(long i, atomic_long_t *v) 791 + raw_atomic_long_fetch_and_acquire(long i, atomic_long_t *v) 792 792 { 793 - return arch_atomic_fetch_and_acquire(i, v); 793 + return raw_atomic_fetch_and_acquire(i, v); 794 794 } 795 795 796 796 static __always_inline long 797 - arch_atomic_long_fetch_and_release(long i, atomic_long_t *v) 797 + raw_atomic_long_fetch_and_release(long i, atomic_long_t *v) 798 798 { 799 - return arch_atomic_fetch_and_release(i, v); 799 + return raw_atomic_fetch_and_release(i, v); 800 800 } 801 801 802 802 static __always_inline long 803 - arch_atomic_long_fetch_and_relaxed(long i, atomic_long_t *v) 803 + raw_atomic_long_fetch_and_relaxed(long i, atomic_long_t *v) 804 804 { 805 - return arch_atomic_fetch_and_relaxed(i, v); 805 + return raw_atomic_fetch_and_relaxed(i, v); 806 806 } 807 807 808 808 static __always_inline void 809 - arch_atomic_long_andnot(long i, atomic_long_t *v) 809 + raw_atomic_long_andnot(long i, atomic_long_t *v) 810 810 { 811 - arch_atomic_andnot(i, v); 811 + raw_atomic_andnot(i, v); 812 812 } 813 813 814 814 static __always_inline long 815 - arch_atomic_long_fetch_andnot(long i, atomic_long_t *v) 815 + raw_atomic_long_fetch_andnot(long i, atomic_long_t *v) 816 816 { 817 - return arch_atomic_fetch_andnot(i, v); 817 + return raw_atomic_fetch_andnot(i, v); 818 818 } 819 819 820 820 static __always_inline long 821 - arch_atomic_long_fetch_andnot_acquire(long i, atomic_long_t *v) 821 + raw_atomic_long_fetch_andnot_acquire(long i, atomic_long_t *v) 822 822 { 823 - return arch_atomic_fetch_andnot_acquire(i, v); 823 + return raw_atomic_fetch_andnot_acquire(i, v); 824 824 } 825 825 826 826 static __always_inline long 827 - arch_atomic_long_fetch_andnot_release(long i, atomic_long_t *v) 827 + raw_atomic_long_fetch_andnot_release(long i, atomic_long_t *v) 828 828 { 829 - return arch_atomic_fetch_andnot_release(i, v); 829 + return raw_atomic_fetch_andnot_release(i, v); 830 830 } 831 831 832 832 static __always_inline long 833 - arch_atomic_long_fetch_andnot_relaxed(long i, atomic_long_t *v) 833 + raw_atomic_long_fetch_andnot_relaxed(long i, atomic_long_t *v) 834 834 { 835 - return arch_atomic_fetch_andnot_relaxed(i, v); 835 + return raw_atomic_fetch_andnot_relaxed(i, v); 836 836 } 837 837 838 838 static __always_inline void 839 - arch_atomic_long_or(long i, atomic_long_t *v) 839 + raw_atomic_long_or(long i, atomic_long_t *v) 840 840 { 841 - arch_atomic_or(i, v); 841 + raw_atomic_or(i, v); 842 842 } 843 843 844 844 static __always_inline long 845 - arch_atomic_long_fetch_or(long i, atomic_long_t *v) 845 + raw_atomic_long_fetch_or(long i, atomic_long_t *v) 846 846 { 847 - return arch_atomic_fetch_or(i, v); 847 + return raw_atomic_fetch_or(i, v); 848 848 } 849 849 850 850 static __always_inline long 851 - arch_atomic_long_fetch_or_acquire(long i, atomic_long_t *v) 851 + raw_atomic_long_fetch_or_acquire(long i, atomic_long_t *v) 852 852 { 853 - return arch_atomic_fetch_or_acquire(i, v); 853 + return raw_atomic_fetch_or_acquire(i, v); 854 854 } 855 855 856 856 static __always_inline long 857 - arch_atomic_long_fetch_or_release(long i, atomic_long_t *v) 857 + raw_atomic_long_fetch_or_release(long i, atomic_long_t *v) 858 858 { 859 - return arch_atomic_fetch_or_release(i, v); 859 + return raw_atomic_fetch_or_release(i, v); 860 860 } 861 861 862 862 static __always_inline long 863 - arch_atomic_long_fetch_or_relaxed(long i, atomic_long_t *v) 863 + raw_atomic_long_fetch_or_relaxed(long i, atomic_long_t *v) 864 864 { 865 - return arch_atomic_fetch_or_relaxed(i, v); 865 + return raw_atomic_fetch_or_relaxed(i, v); 866 866 } 867 867 868 868 static __always_inline void 869 - arch_atomic_long_xor(long i, atomic_long_t *v) 869 + raw_atomic_long_xor(long i, atomic_long_t *v) 870 870 { 871 - arch_atomic_xor(i, v); 871 + raw_atomic_xor(i, v); 872 872 } 873 873 874 874 static __always_inline long 875 - arch_atomic_long_fetch_xor(long i, atomic_long_t *v) 875 + raw_atomic_long_fetch_xor(long i, atomic_long_t *v) 876 876 { 877 - return arch_atomic_fetch_xor(i, v); 877 + return raw_atomic_fetch_xor(i, v); 878 878 } 879 879 880 880 static __always_inline long 881 - arch_atomic_long_fetch_xor_acquire(long i, atomic_long_t *v) 881 + raw_atomic_long_fetch_xor_acquire(long i, atomic_long_t *v) 882 882 { 883 - return arch_atomic_fetch_xor_acquire(i, v); 883 + return raw_atomic_fetch_xor_acquire(i, v); 884 884 } 885 885 886 886 static __always_inline long 887 - arch_atomic_long_fetch_xor_release(long i, atomic_long_t *v) 887 + raw_atomic_long_fetch_xor_release(long i, atomic_long_t *v) 888 888 { 889 - return arch_atomic_fetch_xor_release(i, v); 889 + return raw_atomic_fetch_xor_release(i, v); 890 890 } 891 891 892 892 static __always_inline long 893 - arch_atomic_long_fetch_xor_relaxed(long i, atomic_long_t *v) 893 + raw_atomic_long_fetch_xor_relaxed(long i, atomic_long_t *v) 894 894 { 895 - return arch_atomic_fetch_xor_relaxed(i, v); 895 + return raw_atomic_fetch_xor_relaxed(i, v); 896 896 } 897 897 898 898 static __always_inline long 899 - arch_atomic_long_xchg(atomic_long_t *v, long i) 899 + raw_atomic_long_xchg(atomic_long_t *v, long i) 900 900 { 901 - return arch_atomic_xchg(v, i); 901 + return raw_atomic_xchg(v, i); 902 902 } 903 903 904 904 static __always_inline long 905 - arch_atomic_long_xchg_acquire(atomic_long_t *v, long i) 905 + raw_atomic_long_xchg_acquire(atomic_long_t *v, long i) 906 906 { 907 - return arch_atomic_xchg_acquire(v, i); 907 + return raw_atomic_xchg_acquire(v, i); 908 908 } 909 909 910 910 static __always_inline long 911 - arch_atomic_long_xchg_release(atomic_long_t *v, long i) 911 + raw_atomic_long_xchg_release(atomic_long_t *v, long i) 912 912 { 913 - return arch_atomic_xchg_release(v, i); 913 + return raw_atomic_xchg_release(v, i); 914 914 } 915 915 916 916 static __always_inline long 917 - arch_atomic_long_xchg_relaxed(atomic_long_t *v, long i) 917 + raw_atomic_long_xchg_relaxed(atomic_long_t *v, long i) 918 918 { 919 - return arch_atomic_xchg_relaxed(v, i); 919 + return raw_atomic_xchg_relaxed(v, i); 920 920 } 921 921 922 922 static __always_inline long 923 - arch_atomic_long_cmpxchg(atomic_long_t *v, long old, long new) 923 + raw_atomic_long_cmpxchg(atomic_long_t *v, long old, long new) 924 924 { 925 - return arch_atomic_cmpxchg(v, old, new); 925 + return raw_atomic_cmpxchg(v, old, new); 926 926 } 927 927 928 928 static __always_inline long 929 - arch_atomic_long_cmpxchg_acquire(atomic_long_t *v, long old, long new) 929 + raw_atomic_long_cmpxchg_acquire(atomic_long_t *v, long old, long new) 930 930 { 931 - return arch_atomic_cmpxchg_acquire(v, old, new); 931 + return raw_atomic_cmpxchg_acquire(v, old, new); 932 932 } 933 933 934 934 static __always_inline long 935 - arch_atomic_long_cmpxchg_release(atomic_long_t *v, long old, long new) 935 + raw_atomic_long_cmpxchg_release(atomic_long_t *v, long old, long new) 936 936 { 937 - return arch_atomic_cmpxchg_release(v, old, new); 937 + return raw_atomic_cmpxchg_release(v, old, new); 938 938 } 939 939 940 940 static __always_inline long 941 - arch_atomic_long_cmpxchg_relaxed(atomic_long_t *v, long old, long new) 941 + raw_atomic_long_cmpxchg_relaxed(atomic_long_t *v, long old, long new) 942 942 { 943 - return arch_atomic_cmpxchg_relaxed(v, old, new); 943 + return raw_atomic_cmpxchg_relaxed(v, old, new); 944 944 } 945 945 946 946 static __always_inline bool 947 - arch_atomic_long_try_cmpxchg(atomic_long_t *v, long *old, long new) 947 + raw_atomic_long_try_cmpxchg(atomic_long_t *v, long *old, long new) 948 948 { 949 - return arch_atomic_try_cmpxchg(v, (int *)old, new); 949 + return raw_atomic_try_cmpxchg(v, (int *)old, new); 950 950 } 951 951 952 952 static __always_inline bool 953 - arch_atomic_long_try_cmpxchg_acquire(atomic_long_t *v, long *old, long new) 953 + raw_atomic_long_try_cmpxchg_acquire(atomic_long_t *v, long *old, long new) 954 954 { 955 - return arch_atomic_try_cmpxchg_acquire(v, (int *)old, new); 955 + return raw_atomic_try_cmpxchg_acquire(v, (int *)old, new); 956 956 } 957 957 958 958 static __always_inline bool 959 - arch_atomic_long_try_cmpxchg_release(atomic_long_t *v, long *old, long new) 959 + raw_atomic_long_try_cmpxchg_release(atomic_long_t *v, long *old, long new) 960 960 { 961 - return arch_atomic_try_cmpxchg_release(v, (int *)old, new); 961 + return raw_atomic_try_cmpxchg_release(v, (int *)old, new); 962 962 } 963 963 964 964 static __always_inline bool 965 - arch_atomic_long_try_cmpxchg_relaxed(atomic_long_t *v, long *old, long new) 965 + raw_atomic_long_try_cmpxchg_relaxed(atomic_long_t *v, long *old, long new) 966 966 { 967 - return arch_atomic_try_cmpxchg_relaxed(v, (int *)old, new); 967 + return raw_atomic_try_cmpxchg_relaxed(v, (int *)old, new); 968 968 } 969 969 970 970 static __always_inline bool 971 - arch_atomic_long_sub_and_test(long i, atomic_long_t *v) 971 + raw_atomic_long_sub_and_test(long i, atomic_long_t *v) 972 972 { 973 - return arch_atomic_sub_and_test(i, v); 973 + return raw_atomic_sub_and_test(i, v); 974 974 } 975 975 976 976 static __always_inline bool 977 - arch_atomic_long_dec_and_test(atomic_long_t *v) 977 + raw_atomic_long_dec_and_test(atomic_long_t *v) 978 978 { 979 - return arch_atomic_dec_and_test(v); 979 + return raw_atomic_dec_and_test(v); 980 980 } 981 981 982 982 static __always_inline bool 983 - arch_atomic_long_inc_and_test(atomic_long_t *v) 983 + raw_atomic_long_inc_and_test(atomic_long_t *v) 984 984 { 985 - return arch_atomic_inc_and_test(v); 985 + return raw_atomic_inc_and_test(v); 986 986 } 987 987 988 988 static __always_inline bool 989 - arch_atomic_long_add_negative(long i, atomic_long_t *v) 989 + raw_atomic_long_add_negative(long i, atomic_long_t *v) 990 990 { 991 - return arch_atomic_add_negative(i, v); 991 + return raw_atomic_add_negative(i, v); 992 992 } 993 993 994 994 static __always_inline bool 995 - arch_atomic_long_add_negative_acquire(long i, atomic_long_t *v) 995 + raw_atomic_long_add_negative_acquire(long i, atomic_long_t *v) 996 996 { 997 - return arch_atomic_add_negative_acquire(i, v); 997 + return raw_atomic_add_negative_acquire(i, v); 998 998 } 999 999 1000 1000 static __always_inline bool 1001 - arch_atomic_long_add_negative_release(long i, atomic_long_t *v) 1001 + raw_atomic_long_add_negative_release(long i, atomic_long_t *v) 1002 1002 { 1003 - return arch_atomic_add_negative_release(i, v); 1003 + return raw_atomic_add_negative_release(i, v); 1004 1004 } 1005 1005 1006 1006 static __always_inline bool 1007 - arch_atomic_long_add_negative_relaxed(long i, atomic_long_t *v) 1007 + raw_atomic_long_add_negative_relaxed(long i, atomic_long_t *v) 1008 1008 { 1009 - return arch_atomic_add_negative_relaxed(i, v); 1009 + return raw_atomic_add_negative_relaxed(i, v); 1010 1010 } 1011 1011 1012 1012 static __always_inline long 1013 - arch_atomic_long_fetch_add_unless(atomic_long_t *v, long a, long u) 1013 + raw_atomic_long_fetch_add_unless(atomic_long_t *v, long a, long u) 1014 1014 { 1015 - return arch_atomic_fetch_add_unless(v, a, u); 1015 + return raw_atomic_fetch_add_unless(v, a, u); 1016 1016 } 1017 1017 1018 1018 static __always_inline bool 1019 - arch_atomic_long_add_unless(atomic_long_t *v, long a, long u) 1019 + raw_atomic_long_add_unless(atomic_long_t *v, long a, long u) 1020 1020 { 1021 - return arch_atomic_add_unless(v, a, u); 1021 + return raw_atomic_add_unless(v, a, u); 1022 1022 } 1023 1023 1024 1024 static __always_inline bool 1025 - arch_atomic_long_inc_not_zero(atomic_long_t *v) 1025 + raw_atomic_long_inc_not_zero(atomic_long_t *v) 1026 1026 { 1027 - return arch_atomic_inc_not_zero(v); 1027 + return raw_atomic_inc_not_zero(v); 1028 1028 } 1029 1029 1030 1030 static __always_inline bool 1031 - arch_atomic_long_inc_unless_negative(atomic_long_t *v) 1031 + raw_atomic_long_inc_unless_negative(atomic_long_t *v) 1032 1032 { 1033 - return arch_atomic_inc_unless_negative(v); 1033 + return raw_atomic_inc_unless_negative(v); 1034 1034 } 1035 1035 1036 1036 static __always_inline bool 1037 - arch_atomic_long_dec_unless_positive(atomic_long_t *v) 1037 + raw_atomic_long_dec_unless_positive(atomic_long_t *v) 1038 1038 { 1039 - return arch_atomic_dec_unless_positive(v); 1039 + return raw_atomic_dec_unless_positive(v); 1040 1040 } 1041 1041 1042 1042 static __always_inline long 1043 - arch_atomic_long_dec_if_positive(atomic_long_t *v) 1043 + raw_atomic_long_dec_if_positive(atomic_long_t *v) 1044 1044 { 1045 - return arch_atomic_dec_if_positive(v); 1045 + return raw_atomic_dec_if_positive(v); 1046 1046 } 1047 1047 1048 1048 #endif /* CONFIG_64BIT */ 1049 1049 #endif /* _LINUX_ATOMIC_LONG_H */ 1050 - // a194c07d7d2f4b0e178d3c118c919775d5d65f50 1050 + // 108784846d3bbbb201b8dabe621c5dc30b216206
+1 -511
include/linux/atomic/atomic-raw.h
··· 1026 1026 return arch_atomic64_dec_if_positive(v); 1027 1027 } 1028 1028 1029 - static __always_inline long 1030 - raw_atomic_long_read(const atomic_long_t *v) 1031 - { 1032 - return arch_atomic_long_read(v); 1033 - } 1034 - 1035 - static __always_inline long 1036 - raw_atomic_long_read_acquire(const atomic_long_t *v) 1037 - { 1038 - return arch_atomic_long_read_acquire(v); 1039 - } 1040 - 1041 - static __always_inline void 1042 - raw_atomic_long_set(atomic_long_t *v, long i) 1043 - { 1044 - arch_atomic_long_set(v, i); 1045 - } 1046 - 1047 - static __always_inline void 1048 - raw_atomic_long_set_release(atomic_long_t *v, long i) 1049 - { 1050 - arch_atomic_long_set_release(v, i); 1051 - } 1052 - 1053 - static __always_inline void 1054 - raw_atomic_long_add(long i, atomic_long_t *v) 1055 - { 1056 - arch_atomic_long_add(i, v); 1057 - } 1058 - 1059 - static __always_inline long 1060 - raw_atomic_long_add_return(long i, atomic_long_t *v) 1061 - { 1062 - return arch_atomic_long_add_return(i, v); 1063 - } 1064 - 1065 - static __always_inline long 1066 - raw_atomic_long_add_return_acquire(long i, atomic_long_t *v) 1067 - { 1068 - return arch_atomic_long_add_return_acquire(i, v); 1069 - } 1070 - 1071 - static __always_inline long 1072 - raw_atomic_long_add_return_release(long i, atomic_long_t *v) 1073 - { 1074 - return arch_atomic_long_add_return_release(i, v); 1075 - } 1076 - 1077 - static __always_inline long 1078 - raw_atomic_long_add_return_relaxed(long i, atomic_long_t *v) 1079 - { 1080 - return arch_atomic_long_add_return_relaxed(i, v); 1081 - } 1082 - 1083 - static __always_inline long 1084 - raw_atomic_long_fetch_add(long i, atomic_long_t *v) 1085 - { 1086 - return arch_atomic_long_fetch_add(i, v); 1087 - } 1088 - 1089 - static __always_inline long 1090 - raw_atomic_long_fetch_add_acquire(long i, atomic_long_t *v) 1091 - { 1092 - return arch_atomic_long_fetch_add_acquire(i, v); 1093 - } 1094 - 1095 - static __always_inline long 1096 - raw_atomic_long_fetch_add_release(long i, atomic_long_t *v) 1097 - { 1098 - return arch_atomic_long_fetch_add_release(i, v); 1099 - } 1100 - 1101 - static __always_inline long 1102 - raw_atomic_long_fetch_add_relaxed(long i, atomic_long_t *v) 1103 - { 1104 - return arch_atomic_long_fetch_add_relaxed(i, v); 1105 - } 1106 - 1107 - static __always_inline void 1108 - raw_atomic_long_sub(long i, atomic_long_t *v) 1109 - { 1110 - arch_atomic_long_sub(i, v); 1111 - } 1112 - 1113 - static __always_inline long 1114 - raw_atomic_long_sub_return(long i, atomic_long_t *v) 1115 - { 1116 - return arch_atomic_long_sub_return(i, v); 1117 - } 1118 - 1119 - static __always_inline long 1120 - raw_atomic_long_sub_return_acquire(long i, atomic_long_t *v) 1121 - { 1122 - return arch_atomic_long_sub_return_acquire(i, v); 1123 - } 1124 - 1125 - static __always_inline long 1126 - raw_atomic_long_sub_return_release(long i, atomic_long_t *v) 1127 - { 1128 - return arch_atomic_long_sub_return_release(i, v); 1129 - } 1130 - 1131 - static __always_inline long 1132 - raw_atomic_long_sub_return_relaxed(long i, atomic_long_t *v) 1133 - { 1134 - return arch_atomic_long_sub_return_relaxed(i, v); 1135 - } 1136 - 1137 - static __always_inline long 1138 - raw_atomic_long_fetch_sub(long i, atomic_long_t *v) 1139 - { 1140 - return arch_atomic_long_fetch_sub(i, v); 1141 - } 1142 - 1143 - static __always_inline long 1144 - raw_atomic_long_fetch_sub_acquire(long i, atomic_long_t *v) 1145 - { 1146 - return arch_atomic_long_fetch_sub_acquire(i, v); 1147 - } 1148 - 1149 - static __always_inline long 1150 - raw_atomic_long_fetch_sub_release(long i, atomic_long_t *v) 1151 - { 1152 - return arch_atomic_long_fetch_sub_release(i, v); 1153 - } 1154 - 1155 - static __always_inline long 1156 - raw_atomic_long_fetch_sub_relaxed(long i, atomic_long_t *v) 1157 - { 1158 - return arch_atomic_long_fetch_sub_relaxed(i, v); 1159 - } 1160 - 1161 - static __always_inline void 1162 - raw_atomic_long_inc(atomic_long_t *v) 1163 - { 1164 - arch_atomic_long_inc(v); 1165 - } 1166 - 1167 - static __always_inline long 1168 - raw_atomic_long_inc_return(atomic_long_t *v) 1169 - { 1170 - return arch_atomic_long_inc_return(v); 1171 - } 1172 - 1173 - static __always_inline long 1174 - raw_atomic_long_inc_return_acquire(atomic_long_t *v) 1175 - { 1176 - return arch_atomic_long_inc_return_acquire(v); 1177 - } 1178 - 1179 - static __always_inline long 1180 - raw_atomic_long_inc_return_release(atomic_long_t *v) 1181 - { 1182 - return arch_atomic_long_inc_return_release(v); 1183 - } 1184 - 1185 - static __always_inline long 1186 - raw_atomic_long_inc_return_relaxed(atomic_long_t *v) 1187 - { 1188 - return arch_atomic_long_inc_return_relaxed(v); 1189 - } 1190 - 1191 - static __always_inline long 1192 - raw_atomic_long_fetch_inc(atomic_long_t *v) 1193 - { 1194 - return arch_atomic_long_fetch_inc(v); 1195 - } 1196 - 1197 - static __always_inline long 1198 - raw_atomic_long_fetch_inc_acquire(atomic_long_t *v) 1199 - { 1200 - return arch_atomic_long_fetch_inc_acquire(v); 1201 - } 1202 - 1203 - static __always_inline long 1204 - raw_atomic_long_fetch_inc_release(atomic_long_t *v) 1205 - { 1206 - return arch_atomic_long_fetch_inc_release(v); 1207 - } 1208 - 1209 - static __always_inline long 1210 - raw_atomic_long_fetch_inc_relaxed(atomic_long_t *v) 1211 - { 1212 - return arch_atomic_long_fetch_inc_relaxed(v); 1213 - } 1214 - 1215 - static __always_inline void 1216 - raw_atomic_long_dec(atomic_long_t *v) 1217 - { 1218 - arch_atomic_long_dec(v); 1219 - } 1220 - 1221 - static __always_inline long 1222 - raw_atomic_long_dec_return(atomic_long_t *v) 1223 - { 1224 - return arch_atomic_long_dec_return(v); 1225 - } 1226 - 1227 - static __always_inline long 1228 - raw_atomic_long_dec_return_acquire(atomic_long_t *v) 1229 - { 1230 - return arch_atomic_long_dec_return_acquire(v); 1231 - } 1232 - 1233 - static __always_inline long 1234 - raw_atomic_long_dec_return_release(atomic_long_t *v) 1235 - { 1236 - return arch_atomic_long_dec_return_release(v); 1237 - } 1238 - 1239 - static __always_inline long 1240 - raw_atomic_long_dec_return_relaxed(atomic_long_t *v) 1241 - { 1242 - return arch_atomic_long_dec_return_relaxed(v); 1243 - } 1244 - 1245 - static __always_inline long 1246 - raw_atomic_long_fetch_dec(atomic_long_t *v) 1247 - { 1248 - return arch_atomic_long_fetch_dec(v); 1249 - } 1250 - 1251 - static __always_inline long 1252 - raw_atomic_long_fetch_dec_acquire(atomic_long_t *v) 1253 - { 1254 - return arch_atomic_long_fetch_dec_acquire(v); 1255 - } 1256 - 1257 - static __always_inline long 1258 - raw_atomic_long_fetch_dec_release(atomic_long_t *v) 1259 - { 1260 - return arch_atomic_long_fetch_dec_release(v); 1261 - } 1262 - 1263 - static __always_inline long 1264 - raw_atomic_long_fetch_dec_relaxed(atomic_long_t *v) 1265 - { 1266 - return arch_atomic_long_fetch_dec_relaxed(v); 1267 - } 1268 - 1269 - static __always_inline void 1270 - raw_atomic_long_and(long i, atomic_long_t *v) 1271 - { 1272 - arch_atomic_long_and(i, v); 1273 - } 1274 - 1275 - static __always_inline long 1276 - raw_atomic_long_fetch_and(long i, atomic_long_t *v) 1277 - { 1278 - return arch_atomic_long_fetch_and(i, v); 1279 - } 1280 - 1281 - static __always_inline long 1282 - raw_atomic_long_fetch_and_acquire(long i, atomic_long_t *v) 1283 - { 1284 - return arch_atomic_long_fetch_and_acquire(i, v); 1285 - } 1286 - 1287 - static __always_inline long 1288 - raw_atomic_long_fetch_and_release(long i, atomic_long_t *v) 1289 - { 1290 - return arch_atomic_long_fetch_and_release(i, v); 1291 - } 1292 - 1293 - static __always_inline long 1294 - raw_atomic_long_fetch_and_relaxed(long i, atomic_long_t *v) 1295 - { 1296 - return arch_atomic_long_fetch_and_relaxed(i, v); 1297 - } 1298 - 1299 - static __always_inline void 1300 - raw_atomic_long_andnot(long i, atomic_long_t *v) 1301 - { 1302 - arch_atomic_long_andnot(i, v); 1303 - } 1304 - 1305 - static __always_inline long 1306 - raw_atomic_long_fetch_andnot(long i, atomic_long_t *v) 1307 - { 1308 - return arch_atomic_long_fetch_andnot(i, v); 1309 - } 1310 - 1311 - static __always_inline long 1312 - raw_atomic_long_fetch_andnot_acquire(long i, atomic_long_t *v) 1313 - { 1314 - return arch_atomic_long_fetch_andnot_acquire(i, v); 1315 - } 1316 - 1317 - static __always_inline long 1318 - raw_atomic_long_fetch_andnot_release(long i, atomic_long_t *v) 1319 - { 1320 - return arch_atomic_long_fetch_andnot_release(i, v); 1321 - } 1322 - 1323 - static __always_inline long 1324 - raw_atomic_long_fetch_andnot_relaxed(long i, atomic_long_t *v) 1325 - { 1326 - return arch_atomic_long_fetch_andnot_relaxed(i, v); 1327 - } 1328 - 1329 - static __always_inline void 1330 - raw_atomic_long_or(long i, atomic_long_t *v) 1331 - { 1332 - arch_atomic_long_or(i, v); 1333 - } 1334 - 1335 - static __always_inline long 1336 - raw_atomic_long_fetch_or(long i, atomic_long_t *v) 1337 - { 1338 - return arch_atomic_long_fetch_or(i, v); 1339 - } 1340 - 1341 - static __always_inline long 1342 - raw_atomic_long_fetch_or_acquire(long i, atomic_long_t *v) 1343 - { 1344 - return arch_atomic_long_fetch_or_acquire(i, v); 1345 - } 1346 - 1347 - static __always_inline long 1348 - raw_atomic_long_fetch_or_release(long i, atomic_long_t *v) 1349 - { 1350 - return arch_atomic_long_fetch_or_release(i, v); 1351 - } 1352 - 1353 - static __always_inline long 1354 - raw_atomic_long_fetch_or_relaxed(long i, atomic_long_t *v) 1355 - { 1356 - return arch_atomic_long_fetch_or_relaxed(i, v); 1357 - } 1358 - 1359 - static __always_inline void 1360 - raw_atomic_long_xor(long i, atomic_long_t *v) 1361 - { 1362 - arch_atomic_long_xor(i, v); 1363 - } 1364 - 1365 - static __always_inline long 1366 - raw_atomic_long_fetch_xor(long i, atomic_long_t *v) 1367 - { 1368 - return arch_atomic_long_fetch_xor(i, v); 1369 - } 1370 - 1371 - static __always_inline long 1372 - raw_atomic_long_fetch_xor_acquire(long i, atomic_long_t *v) 1373 - { 1374 - return arch_atomic_long_fetch_xor_acquire(i, v); 1375 - } 1376 - 1377 - static __always_inline long 1378 - raw_atomic_long_fetch_xor_release(long i, atomic_long_t *v) 1379 - { 1380 - return arch_atomic_long_fetch_xor_release(i, v); 1381 - } 1382 - 1383 - static __always_inline long 1384 - raw_atomic_long_fetch_xor_relaxed(long i, atomic_long_t *v) 1385 - { 1386 - return arch_atomic_long_fetch_xor_relaxed(i, v); 1387 - } 1388 - 1389 - static __always_inline long 1390 - raw_atomic_long_xchg(atomic_long_t *v, long i) 1391 - { 1392 - return arch_atomic_long_xchg(v, i); 1393 - } 1394 - 1395 - static __always_inline long 1396 - raw_atomic_long_xchg_acquire(atomic_long_t *v, long i) 1397 - { 1398 - return arch_atomic_long_xchg_acquire(v, i); 1399 - } 1400 - 1401 - static __always_inline long 1402 - raw_atomic_long_xchg_release(atomic_long_t *v, long i) 1403 - { 1404 - return arch_atomic_long_xchg_release(v, i); 1405 - } 1406 - 1407 - static __always_inline long 1408 - raw_atomic_long_xchg_relaxed(atomic_long_t *v, long i) 1409 - { 1410 - return arch_atomic_long_xchg_relaxed(v, i); 1411 - } 1412 - 1413 - static __always_inline long 1414 - raw_atomic_long_cmpxchg(atomic_long_t *v, long old, long new) 1415 - { 1416 - return arch_atomic_long_cmpxchg(v, old, new); 1417 - } 1418 - 1419 - static __always_inline long 1420 - raw_atomic_long_cmpxchg_acquire(atomic_long_t *v, long old, long new) 1421 - { 1422 - return arch_atomic_long_cmpxchg_acquire(v, old, new); 1423 - } 1424 - 1425 - static __always_inline long 1426 - raw_atomic_long_cmpxchg_release(atomic_long_t *v, long old, long new) 1427 - { 1428 - return arch_atomic_long_cmpxchg_release(v, old, new); 1429 - } 1430 - 1431 - static __always_inline long 1432 - raw_atomic_long_cmpxchg_relaxed(atomic_long_t *v, long old, long new) 1433 - { 1434 - return arch_atomic_long_cmpxchg_relaxed(v, old, new); 1435 - } 1436 - 1437 - static __always_inline bool 1438 - raw_atomic_long_try_cmpxchg(atomic_long_t *v, long *old, long new) 1439 - { 1440 - return arch_atomic_long_try_cmpxchg(v, old, new); 1441 - } 1442 - 1443 - static __always_inline bool 1444 - raw_atomic_long_try_cmpxchg_acquire(atomic_long_t *v, long *old, long new) 1445 - { 1446 - return arch_atomic_long_try_cmpxchg_acquire(v, old, new); 1447 - } 1448 - 1449 - static __always_inline bool 1450 - raw_atomic_long_try_cmpxchg_release(atomic_long_t *v, long *old, long new) 1451 - { 1452 - return arch_atomic_long_try_cmpxchg_release(v, old, new); 1453 - } 1454 - 1455 - static __always_inline bool 1456 - raw_atomic_long_try_cmpxchg_relaxed(atomic_long_t *v, long *old, long new) 1457 - { 1458 - return arch_atomic_long_try_cmpxchg_relaxed(v, old, new); 1459 - } 1460 - 1461 - static __always_inline bool 1462 - raw_atomic_long_sub_and_test(long i, atomic_long_t *v) 1463 - { 1464 - return arch_atomic_long_sub_and_test(i, v); 1465 - } 1466 - 1467 - static __always_inline bool 1468 - raw_atomic_long_dec_and_test(atomic_long_t *v) 1469 - { 1470 - return arch_atomic_long_dec_and_test(v); 1471 - } 1472 - 1473 - static __always_inline bool 1474 - raw_atomic_long_inc_and_test(atomic_long_t *v) 1475 - { 1476 - return arch_atomic_long_inc_and_test(v); 1477 - } 1478 - 1479 - static __always_inline bool 1480 - raw_atomic_long_add_negative(long i, atomic_long_t *v) 1481 - { 1482 - return arch_atomic_long_add_negative(i, v); 1483 - } 1484 - 1485 - static __always_inline bool 1486 - raw_atomic_long_add_negative_acquire(long i, atomic_long_t *v) 1487 - { 1488 - return arch_atomic_long_add_negative_acquire(i, v); 1489 - } 1490 - 1491 - static __always_inline bool 1492 - raw_atomic_long_add_negative_release(long i, atomic_long_t *v) 1493 - { 1494 - return arch_atomic_long_add_negative_release(i, v); 1495 - } 1496 - 1497 - static __always_inline bool 1498 - raw_atomic_long_add_negative_relaxed(long i, atomic_long_t *v) 1499 - { 1500 - return arch_atomic_long_add_negative_relaxed(i, v); 1501 - } 1502 - 1503 - static __always_inline long 1504 - raw_atomic_long_fetch_add_unless(atomic_long_t *v, long a, long u) 1505 - { 1506 - return arch_atomic_long_fetch_add_unless(v, a, u); 1507 - } 1508 - 1509 - static __always_inline bool 1510 - raw_atomic_long_add_unless(atomic_long_t *v, long a, long u) 1511 - { 1512 - return arch_atomic_long_add_unless(v, a, u); 1513 - } 1514 - 1515 - static __always_inline bool 1516 - raw_atomic_long_inc_not_zero(atomic_long_t *v) 1517 - { 1518 - return arch_atomic_long_inc_not_zero(v); 1519 - } 1520 - 1521 - static __always_inline bool 1522 - raw_atomic_long_inc_unless_negative(atomic_long_t *v) 1523 - { 1524 - return arch_atomic_long_inc_unless_negative(v); 1525 - } 1526 - 1527 - static __always_inline bool 1528 - raw_atomic_long_dec_unless_positive(atomic_long_t *v) 1529 - { 1530 - return arch_atomic_long_dec_unless_positive(v); 1531 - } 1532 - 1533 - static __always_inline long 1534 - raw_atomic_long_dec_if_positive(atomic_long_t *v) 1535 - { 1536 - return arch_atomic_long_dec_if_positive(v); 1537 - } 1538 - 1539 1029 #define raw_xchg(...) \ 1540 1030 arch_xchg(__VA_ARGS__) 1541 1031 ··· 1132 1642 arch_try_cmpxchg128_local(__VA_ARGS__) 1133 1643 1134 1644 #endif /* _LINUX_ATOMIC_RAW_H */ 1135 - // 01d54200571b3857755a07c10074a4fd58cef6b1 1645 + // b23ed4424e85200e200ded094522e1d743b3a5b1
+2 -2
scripts/atomic/gen-atomic-long.sh
··· 47 47 48 48 cat <<EOF 49 49 static __always_inline ${ret} 50 - arch_atomic_long_${name}(${params}) 50 + raw_atomic_long_${name}(${params}) 51 51 { 52 - ${retstmt}arch_${atomic}_${name}(${argscast}); 52 + ${retstmt}raw_${atomic}_${name}(${argscast}); 53 53 } 54 54 55 55 EOF
-4
scripts/atomic/gen-atomic-raw.sh
··· 63 63 gen_proto "${meta}" "${name}" "atomic64" "s64" ${args} 64 64 done 65 65 66 - grep '^[a-z]' "$1" | while read name meta args; do 67 - gen_proto "${meta}" "${name}" "atomic_long" "long" ${args} 68 - done 69 - 70 66 for xchg in "xchg" "cmpxchg" "cmpxchg64" "cmpxchg128" "try_cmpxchg" "try_cmpxchg64" "try_cmpxchg128"; do 71 67 for order in "" "_acquire" "_release" "_relaxed"; do 72 68 gen_xchg "${xchg}" "${order}"