Lines Matching full:v
446 * @v: pointer to atomic_t
448 * Atomically loads the value of @v with relaxed ordering.
452 * Return: The value loaded from @v.
455 raw_atomic_read(const atomic_t *v) in raw_atomic_read() argument
457 return arch_atomic_read(v); in raw_atomic_read()
462 * @v: pointer to atomic_t
464 * Atomically loads the value of @v with acquire ordering.
468 * Return: The value loaded from @v.
471 raw_atomic_read_acquire(const atomic_t *v) in raw_atomic_read_acquire() argument
474 return arch_atomic_read_acquire(v); in raw_atomic_read_acquire()
479 ret = smp_load_acquire(&(v)->counter); in raw_atomic_read_acquire()
481 ret = raw_atomic_read(v); in raw_atomic_read_acquire()
491 * @v: pointer to atomic_t
494 * Atomically sets @v to @i with relaxed ordering.
501 raw_atomic_set(atomic_t *v, int i) in raw_atomic_set() argument
503 arch_atomic_set(v, i); in raw_atomic_set()
508 * @v: pointer to atomic_t
511 * Atomically sets @v to @i with release ordering.
518 raw_atomic_set_release(atomic_t *v, int i) in raw_atomic_set_release() argument
521 arch_atomic_set_release(v, i); in raw_atomic_set_release()
524 smp_store_release(&(v)->counter, i); in raw_atomic_set_release()
527 raw_atomic_set(v, i); in raw_atomic_set_release()
535 * @v: pointer to atomic_t
537 * Atomically updates @v to (@v + @i) with relaxed ordering.
544 raw_atomic_add(int i, atomic_t *v) in raw_atomic_add() argument
546 arch_atomic_add(i, v); in raw_atomic_add()
552 * @v: pointer to atomic_t
554 * Atomically updates @v to (@v + @i) with full ordering.
558 * Return: The updated value of @v.
561 raw_atomic_add_return(int i, atomic_t *v) in raw_atomic_add_return() argument
564 return arch_atomic_add_return(i, v); in raw_atomic_add_return()
568 ret = arch_atomic_add_return_relaxed(i, v); in raw_atomic_add_return()
579 * @v: pointer to atomic_t
581 * Atomically updates @v to (@v + @i) with acquire ordering.
585 * Return: The updated value of @v.
588 raw_atomic_add_return_acquire(int i, atomic_t *v) in raw_atomic_add_return_acquire() argument
591 return arch_atomic_add_return_acquire(i, v); in raw_atomic_add_return_acquire()
593 int ret = arch_atomic_add_return_relaxed(i, v); in raw_atomic_add_return_acquire()
597 return arch_atomic_add_return(i, v); in raw_atomic_add_return_acquire()
606 * @v: pointer to atomic_t
608 * Atomically updates @v to (@v + @i) with release ordering.
612 * Return: The updated value of @v.
615 raw_atomic_add_return_release(int i, atomic_t *v) in raw_atomic_add_return_release() argument
618 return arch_atomic_add_return_release(i, v); in raw_atomic_add_return_release()
621 return arch_atomic_add_return_relaxed(i, v); in raw_atomic_add_return_release()
623 return arch_atomic_add_return(i, v); in raw_atomic_add_return_release()
632 * @v: pointer to atomic_t
634 * Atomically updates @v to (@v + @i) with relaxed ordering.
638 * Return: The updated value of @v.
641 raw_atomic_add_return_relaxed(int i, atomic_t *v) in raw_atomic_add_return_relaxed() argument
644 return arch_atomic_add_return_relaxed(i, v); in raw_atomic_add_return_relaxed()
646 return arch_atomic_add_return(i, v); in raw_atomic_add_return_relaxed()
655 * @v: pointer to atomic_t
657 * Atomically updates @v to (@v + @i) with full ordering.
661 * Return: The original value of @v.
664 raw_atomic_fetch_add(int i, atomic_t *v) in raw_atomic_fetch_add() argument
667 return arch_atomic_fetch_add(i, v); in raw_atomic_fetch_add()
671 ret = arch_atomic_fetch_add_relaxed(i, v); in raw_atomic_fetch_add()
682 * @v: pointer to atomic_t
684 * Atomically updates @v to (@v + @i) with acquire ordering.
688 * Return: The original value of @v.
691 raw_atomic_fetch_add_acquire(int i, atomic_t *v) in raw_atomic_fetch_add_acquire() argument
694 return arch_atomic_fetch_add_acquire(i, v); in raw_atomic_fetch_add_acquire()
696 int ret = arch_atomic_fetch_add_relaxed(i, v); in raw_atomic_fetch_add_acquire()
700 return arch_atomic_fetch_add(i, v); in raw_atomic_fetch_add_acquire()
709 * @v: pointer to atomic_t
711 * Atomically updates @v to (@v + @i) with release ordering.
715 * Return: The original value of @v.
718 raw_atomic_fetch_add_release(int i, atomic_t *v) in raw_atomic_fetch_add_release() argument
721 return arch_atomic_fetch_add_release(i, v); in raw_atomic_fetch_add_release()
724 return arch_atomic_fetch_add_relaxed(i, v); in raw_atomic_fetch_add_release()
726 return arch_atomic_fetch_add(i, v); in raw_atomic_fetch_add_release()
735 * @v: pointer to atomic_t
737 * Atomically updates @v to (@v + @i) with relaxed ordering.
741 * Return: The original value of @v.
744 raw_atomic_fetch_add_relaxed(int i, atomic_t *v) in raw_atomic_fetch_add_relaxed() argument
747 return arch_atomic_fetch_add_relaxed(i, v); in raw_atomic_fetch_add_relaxed()
749 return arch_atomic_fetch_add(i, v); in raw_atomic_fetch_add_relaxed()
758 * @v: pointer to atomic_t
760 * Atomically updates @v to (@v - @i) with relaxed ordering.
767 raw_atomic_sub(int i, atomic_t *v) in raw_atomic_sub() argument
769 arch_atomic_sub(i, v); in raw_atomic_sub()
775 * @v: pointer to atomic_t
777 * Atomically updates @v to (@v - @i) with full ordering.
781 * Return: The updated value of @v.
784 raw_atomic_sub_return(int i, atomic_t *v) in raw_atomic_sub_return() argument
787 return arch_atomic_sub_return(i, v); in raw_atomic_sub_return()
791 ret = arch_atomic_sub_return_relaxed(i, v); in raw_atomic_sub_return()
802 * @v: pointer to atomic_t
804 * Atomically updates @v to (@v - @i) with acquire ordering.
808 * Return: The updated value of @v.
811 raw_atomic_sub_return_acquire(int i, atomic_t *v) in raw_atomic_sub_return_acquire() argument
814 return arch_atomic_sub_return_acquire(i, v); in raw_atomic_sub_return_acquire()
816 int ret = arch_atomic_sub_return_relaxed(i, v); in raw_atomic_sub_return_acquire()
820 return arch_atomic_sub_return(i, v); in raw_atomic_sub_return_acquire()
829 * @v: pointer to atomic_t
831 * Atomically updates @v to (@v - @i) with release ordering.
835 * Return: The updated value of @v.
838 raw_atomic_sub_return_release(int i, atomic_t *v) in raw_atomic_sub_return_release() argument
841 return arch_atomic_sub_return_release(i, v); in raw_atomic_sub_return_release()
844 return arch_atomic_sub_return_relaxed(i, v); in raw_atomic_sub_return_release()
846 return arch_atomic_sub_return(i, v); in raw_atomic_sub_return_release()
855 * @v: pointer to atomic_t
857 * Atomically updates @v to (@v - @i) with relaxed ordering.
861 * Return: The updated value of @v.
864 raw_atomic_sub_return_relaxed(int i, atomic_t *v) in raw_atomic_sub_return_relaxed() argument
867 return arch_atomic_sub_return_relaxed(i, v); in raw_atomic_sub_return_relaxed()
869 return arch_atomic_sub_return(i, v); in raw_atomic_sub_return_relaxed()
878 * @v: pointer to atomic_t
880 * Atomically updates @v to (@v - @i) with full ordering.
884 * Return: The original value of @v.
887 raw_atomic_fetch_sub(int i, atomic_t *v) in raw_atomic_fetch_sub() argument
890 return arch_atomic_fetch_sub(i, v); in raw_atomic_fetch_sub()
894 ret = arch_atomic_fetch_sub_relaxed(i, v); in raw_atomic_fetch_sub()
905 * @v: pointer to atomic_t
907 * Atomically updates @v to (@v - @i) with acquire ordering.
911 * Return: The original value of @v.
914 raw_atomic_fetch_sub_acquire(int i, atomic_t *v) in raw_atomic_fetch_sub_acquire() argument
917 return arch_atomic_fetch_sub_acquire(i, v); in raw_atomic_fetch_sub_acquire()
919 int ret = arch_atomic_fetch_sub_relaxed(i, v); in raw_atomic_fetch_sub_acquire()
923 return arch_atomic_fetch_sub(i, v); in raw_atomic_fetch_sub_acquire()
932 * @v: pointer to atomic_t
934 * Atomically updates @v to (@v - @i) with release ordering.
938 * Return: The original value of @v.
941 raw_atomic_fetch_sub_release(int i, atomic_t *v) in raw_atomic_fetch_sub_release() argument
944 return arch_atomic_fetch_sub_release(i, v); in raw_atomic_fetch_sub_release()
947 return arch_atomic_fetch_sub_relaxed(i, v); in raw_atomic_fetch_sub_release()
949 return arch_atomic_fetch_sub(i, v); in raw_atomic_fetch_sub_release()
958 * @v: pointer to atomic_t
960 * Atomically updates @v to (@v - @i) with relaxed ordering.
964 * Return: The original value of @v.
967 raw_atomic_fetch_sub_relaxed(int i, atomic_t *v) in raw_atomic_fetch_sub_relaxed() argument
970 return arch_atomic_fetch_sub_relaxed(i, v); in raw_atomic_fetch_sub_relaxed()
972 return arch_atomic_fetch_sub(i, v); in raw_atomic_fetch_sub_relaxed()
980 * @v: pointer to atomic_t
982 * Atomically updates @v to (@v + 1) with relaxed ordering.
989 raw_atomic_inc(atomic_t *v) in raw_atomic_inc() argument
992 arch_atomic_inc(v); in raw_atomic_inc()
994 raw_atomic_add(1, v); in raw_atomic_inc()
1000 * @v: pointer to atomic_t
1002 * Atomically updates @v to (@v + 1) with full ordering.
1006 * Return: The updated value of @v.
1009 raw_atomic_inc_return(atomic_t *v) in raw_atomic_inc_return() argument
1012 return arch_atomic_inc_return(v); in raw_atomic_inc_return()
1016 ret = arch_atomic_inc_return_relaxed(v); in raw_atomic_inc_return()
1020 return raw_atomic_add_return(1, v); in raw_atomic_inc_return()
1026 * @v: pointer to atomic_t
1028 * Atomically updates @v to (@v + 1) with acquire ordering.
1032 * Return: The updated value of @v.
1035 raw_atomic_inc_return_acquire(atomic_t *v) in raw_atomic_inc_return_acquire() argument
1038 return arch_atomic_inc_return_acquire(v); in raw_atomic_inc_return_acquire()
1040 int ret = arch_atomic_inc_return_relaxed(v); in raw_atomic_inc_return_acquire()
1044 return arch_atomic_inc_return(v); in raw_atomic_inc_return_acquire()
1046 return raw_atomic_add_return_acquire(1, v); in raw_atomic_inc_return_acquire()
1052 * @v: pointer to atomic_t
1054 * Atomically updates @v to (@v + 1) with release ordering.
1058 * Return: The updated value of @v.
1061 raw_atomic_inc_return_release(atomic_t *v) in raw_atomic_inc_return_release() argument
1064 return arch_atomic_inc_return_release(v); in raw_atomic_inc_return_release()
1067 return arch_atomic_inc_return_relaxed(v); in raw_atomic_inc_return_release()
1069 return arch_atomic_inc_return(v); in raw_atomic_inc_return_release()
1071 return raw_atomic_add_return_release(1, v); in raw_atomic_inc_return_release()
1077 * @v: pointer to atomic_t
1079 * Atomically updates @v to (@v + 1) with relaxed ordering.
1083 * Return: The updated value of @v.
1086 raw_atomic_inc_return_relaxed(atomic_t *v) in raw_atomic_inc_return_relaxed() argument
1089 return arch_atomic_inc_return_relaxed(v); in raw_atomic_inc_return_relaxed()
1091 return arch_atomic_inc_return(v); in raw_atomic_inc_return_relaxed()
1093 return raw_atomic_add_return_relaxed(1, v); in raw_atomic_inc_return_relaxed()
1099 * @v: pointer to atomic_t
1101 * Atomically updates @v to (@v + 1) with full ordering.
1105 * Return: The original value of @v.
1108 raw_atomic_fetch_inc(atomic_t *v) in raw_atomic_fetch_inc() argument
1111 return arch_atomic_fetch_inc(v); in raw_atomic_fetch_inc()
1115 ret = arch_atomic_fetch_inc_relaxed(v); in raw_atomic_fetch_inc()
1119 return raw_atomic_fetch_add(1, v); in raw_atomic_fetch_inc()
1125 * @v: pointer to atomic_t
1127 * Atomically updates @v to (@v + 1) with acquire ordering.
1131 * Return: The original value of @v.
1134 raw_atomic_fetch_inc_acquire(atomic_t *v) in raw_atomic_fetch_inc_acquire() argument
1137 return arch_atomic_fetch_inc_acquire(v); in raw_atomic_fetch_inc_acquire()
1139 int ret = arch_atomic_fetch_inc_relaxed(v); in raw_atomic_fetch_inc_acquire()
1143 return arch_atomic_fetch_inc(v); in raw_atomic_fetch_inc_acquire()
1145 return raw_atomic_fetch_add_acquire(1, v); in raw_atomic_fetch_inc_acquire()
1151 * @v: pointer to atomic_t
1153 * Atomically updates @v to (@v + 1) with release ordering.
1157 * Return: The original value of @v.
1160 raw_atomic_fetch_inc_release(atomic_t *v) in raw_atomic_fetch_inc_release() argument
1163 return arch_atomic_fetch_inc_release(v); in raw_atomic_fetch_inc_release()
1166 return arch_atomic_fetch_inc_relaxed(v); in raw_atomic_fetch_inc_release()
1168 return arch_atomic_fetch_inc(v); in raw_atomic_fetch_inc_release()
1170 return raw_atomic_fetch_add_release(1, v); in raw_atomic_fetch_inc_release()
1176 * @v: pointer to atomic_t
1178 * Atomically updates @v to (@v + 1) with relaxed ordering.
1182 * Return: The original value of @v.
1185 raw_atomic_fetch_inc_relaxed(atomic_t *v) in raw_atomic_fetch_inc_relaxed() argument
1188 return arch_atomic_fetch_inc_relaxed(v); in raw_atomic_fetch_inc_relaxed()
1190 return arch_atomic_fetch_inc(v); in raw_atomic_fetch_inc_relaxed()
1192 return raw_atomic_fetch_add_relaxed(1, v); in raw_atomic_fetch_inc_relaxed()
1198 * @v: pointer to atomic_t
1200 * Atomically updates @v to (@v - 1) with relaxed ordering.
1207 raw_atomic_dec(atomic_t *v) in raw_atomic_dec() argument
1210 arch_atomic_dec(v); in raw_atomic_dec()
1212 raw_atomic_sub(1, v); in raw_atomic_dec()
1218 * @v: pointer to atomic_t
1220 * Atomically updates @v to (@v - 1) with full ordering.
1224 * Return: The updated value of @v.
1227 raw_atomic_dec_return(atomic_t *v) in raw_atomic_dec_return() argument
1230 return arch_atomic_dec_return(v); in raw_atomic_dec_return()
1234 ret = arch_atomic_dec_return_relaxed(v); in raw_atomic_dec_return()
1238 return raw_atomic_sub_return(1, v); in raw_atomic_dec_return()
1244 * @v: pointer to atomic_t
1246 * Atomically updates @v to (@v - 1) with acquire ordering.
1250 * Return: The updated value of @v.
1253 raw_atomic_dec_return_acquire(atomic_t *v) in raw_atomic_dec_return_acquire() argument
1256 return arch_atomic_dec_return_acquire(v); in raw_atomic_dec_return_acquire()
1258 int ret = arch_atomic_dec_return_relaxed(v); in raw_atomic_dec_return_acquire()
1262 return arch_atomic_dec_return(v); in raw_atomic_dec_return_acquire()
1264 return raw_atomic_sub_return_acquire(1, v); in raw_atomic_dec_return_acquire()
1270 * @v: pointer to atomic_t
1272 * Atomically updates @v to (@v - 1) with release ordering.
1276 * Return: The updated value of @v.
1279 raw_atomic_dec_return_release(atomic_t *v) in raw_atomic_dec_return_release() argument
1282 return arch_atomic_dec_return_release(v); in raw_atomic_dec_return_release()
1285 return arch_atomic_dec_return_relaxed(v); in raw_atomic_dec_return_release()
1287 return arch_atomic_dec_return(v); in raw_atomic_dec_return_release()
1289 return raw_atomic_sub_return_release(1, v); in raw_atomic_dec_return_release()
1295 * @v: pointer to atomic_t
1297 * Atomically updates @v to (@v - 1) with relaxed ordering.
1301 * Return: The updated value of @v.
1304 raw_atomic_dec_return_relaxed(atomic_t *v) in raw_atomic_dec_return_relaxed() argument
1307 return arch_atomic_dec_return_relaxed(v); in raw_atomic_dec_return_relaxed()
1309 return arch_atomic_dec_return(v); in raw_atomic_dec_return_relaxed()
1311 return raw_atomic_sub_return_relaxed(1, v); in raw_atomic_dec_return_relaxed()
1317 * @v: pointer to atomic_t
1319 * Atomically updates @v to (@v - 1) with full ordering.
1323 * Return: The original value of @v.
1326 raw_atomic_fetch_dec(atomic_t *v) in raw_atomic_fetch_dec() argument
1329 return arch_atomic_fetch_dec(v); in raw_atomic_fetch_dec()
1333 ret = arch_atomic_fetch_dec_relaxed(v); in raw_atomic_fetch_dec()
1337 return raw_atomic_fetch_sub(1, v); in raw_atomic_fetch_dec()
1343 * @v: pointer to atomic_t
1345 * Atomically updates @v to (@v - 1) with acquire ordering.
1349 * Return: The original value of @v.
1352 raw_atomic_fetch_dec_acquire(atomic_t *v) in raw_atomic_fetch_dec_acquire() argument
1355 return arch_atomic_fetch_dec_acquire(v); in raw_atomic_fetch_dec_acquire()
1357 int ret = arch_atomic_fetch_dec_relaxed(v); in raw_atomic_fetch_dec_acquire()
1361 return arch_atomic_fetch_dec(v); in raw_atomic_fetch_dec_acquire()
1363 return raw_atomic_fetch_sub_acquire(1, v); in raw_atomic_fetch_dec_acquire()
1369 * @v: pointer to atomic_t
1371 * Atomically updates @v to (@v - 1) with release ordering.
1375 * Return: The original value of @v.
1378 raw_atomic_fetch_dec_release(atomic_t *v) in raw_atomic_fetch_dec_release() argument
1381 return arch_atomic_fetch_dec_release(v); in raw_atomic_fetch_dec_release()
1384 return arch_atomic_fetch_dec_relaxed(v); in raw_atomic_fetch_dec_release()
1386 return arch_atomic_fetch_dec(v); in raw_atomic_fetch_dec_release()
1388 return raw_atomic_fetch_sub_release(1, v); in raw_atomic_fetch_dec_release()
1394 * @v: pointer to atomic_t
1396 * Atomically updates @v to (@v - 1) with relaxed ordering.
1400 * Return: The original value of @v.
1403 raw_atomic_fetch_dec_relaxed(atomic_t *v) in raw_atomic_fetch_dec_relaxed() argument
1406 return arch_atomic_fetch_dec_relaxed(v); in raw_atomic_fetch_dec_relaxed()
1408 return arch_atomic_fetch_dec(v); in raw_atomic_fetch_dec_relaxed()
1410 return raw_atomic_fetch_sub_relaxed(1, v); in raw_atomic_fetch_dec_relaxed()
1417 * @v: pointer to atomic_t
1419 * Atomically updates @v to (@v & @i) with relaxed ordering.
1426 raw_atomic_and(int i, atomic_t *v) in raw_atomic_and() argument
1428 arch_atomic_and(i, v); in raw_atomic_and()
1434 * @v: pointer to atomic_t
1436 * Atomically updates @v to (@v & @i) with full ordering.
1440 * Return: The original value of @v.
1443 raw_atomic_fetch_and(int i, atomic_t *v) in raw_atomic_fetch_and() argument
1446 return arch_atomic_fetch_and(i, v); in raw_atomic_fetch_and()
1450 ret = arch_atomic_fetch_and_relaxed(i, v); in raw_atomic_fetch_and()
1461 * @v: pointer to atomic_t
1463 * Atomically updates @v to (@v & @i) with acquire ordering.
1467 * Return: The original value of @v.
1470 raw_atomic_fetch_and_acquire(int i, atomic_t *v) in raw_atomic_fetch_and_acquire() argument
1473 return arch_atomic_fetch_and_acquire(i, v); in raw_atomic_fetch_and_acquire()
1475 int ret = arch_atomic_fetch_and_relaxed(i, v); in raw_atomic_fetch_and_acquire()
1479 return arch_atomic_fetch_and(i, v); in raw_atomic_fetch_and_acquire()
1488 * @v: pointer to atomic_t
1490 * Atomically updates @v to (@v & @i) with release ordering.
1494 * Return: The original value of @v.
1497 raw_atomic_fetch_and_release(int i, atomic_t *v) in raw_atomic_fetch_and_release() argument
1500 return arch_atomic_fetch_and_release(i, v); in raw_atomic_fetch_and_release()
1503 return arch_atomic_fetch_and_relaxed(i, v); in raw_atomic_fetch_and_release()
1505 return arch_atomic_fetch_and(i, v); in raw_atomic_fetch_and_release()
1514 * @v: pointer to atomic_t
1516 * Atomically updates @v to (@v & @i) with relaxed ordering.
1520 * Return: The original value of @v.
1523 raw_atomic_fetch_and_relaxed(int i, atomic_t *v) in raw_atomic_fetch_and_relaxed() argument
1526 return arch_atomic_fetch_and_relaxed(i, v); in raw_atomic_fetch_and_relaxed()
1528 return arch_atomic_fetch_and(i, v); in raw_atomic_fetch_and_relaxed()
1537 * @v: pointer to atomic_t
1539 * Atomically updates @v to (@v & ~@i) with relaxed ordering.
1546 raw_atomic_andnot(int i, atomic_t *v) in raw_atomic_andnot() argument
1549 arch_atomic_andnot(i, v); in raw_atomic_andnot()
1551 raw_atomic_and(~i, v); in raw_atomic_andnot()
1558 * @v: pointer to atomic_t
1560 * Atomically updates @v to (@v & ~@i) with full ordering.
1564 * Return: The original value of @v.
1567 raw_atomic_fetch_andnot(int i, atomic_t *v) in raw_atomic_fetch_andnot() argument
1570 return arch_atomic_fetch_andnot(i, v); in raw_atomic_fetch_andnot()
1574 ret = arch_atomic_fetch_andnot_relaxed(i, v); in raw_atomic_fetch_andnot()
1578 return raw_atomic_fetch_and(~i, v); in raw_atomic_fetch_andnot()
1585 * @v: pointer to atomic_t
1587 * Atomically updates @v to (@v & ~@i) with acquire ordering.
1591 * Return: The original value of @v.
1594 raw_atomic_fetch_andnot_acquire(int i, atomic_t *v) in raw_atomic_fetch_andnot_acquire() argument
1597 return arch_atomic_fetch_andnot_acquire(i, v); in raw_atomic_fetch_andnot_acquire()
1599 int ret = arch_atomic_fetch_andnot_relaxed(i, v); in raw_atomic_fetch_andnot_acquire()
1603 return arch_atomic_fetch_andnot(i, v); in raw_atomic_fetch_andnot_acquire()
1605 return raw_atomic_fetch_and_acquire(~i, v); in raw_atomic_fetch_andnot_acquire()
1612 * @v: pointer to atomic_t
1614 * Atomically updates @v to (@v & ~@i) with release ordering.
1618 * Return: The original value of @v.
1621 raw_atomic_fetch_andnot_release(int i, atomic_t *v) in raw_atomic_fetch_andnot_release() argument
1624 return arch_atomic_fetch_andnot_release(i, v); in raw_atomic_fetch_andnot_release()
1627 return arch_atomic_fetch_andnot_relaxed(i, v); in raw_atomic_fetch_andnot_release()
1629 return arch_atomic_fetch_andnot(i, v); in raw_atomic_fetch_andnot_release()
1631 return raw_atomic_fetch_and_release(~i, v); in raw_atomic_fetch_andnot_release()
1638 * @v: pointer to atomic_t
1640 * Atomically updates @v to (@v & ~@i) with relaxed ordering.
1644 * Return: The original value of @v.
1647 raw_atomic_fetch_andnot_relaxed(int i, atomic_t *v) in raw_atomic_fetch_andnot_relaxed() argument
1650 return arch_atomic_fetch_andnot_relaxed(i, v); in raw_atomic_fetch_andnot_relaxed()
1652 return arch_atomic_fetch_andnot(i, v); in raw_atomic_fetch_andnot_relaxed()
1654 return raw_atomic_fetch_and_relaxed(~i, v); in raw_atomic_fetch_andnot_relaxed()
1661 * @v: pointer to atomic_t
1663 * Atomically updates @v to (@v | @i) with relaxed ordering.
1670 raw_atomic_or(int i, atomic_t *v) in raw_atomic_or() argument
1672 arch_atomic_or(i, v); in raw_atomic_or()
1678 * @v: pointer to atomic_t
1680 * Atomically updates @v to (@v | @i) with full ordering.
1684 * Return: The original value of @v.
1687 raw_atomic_fetch_or(int i, atomic_t *v) in raw_atomic_fetch_or() argument
1690 return arch_atomic_fetch_or(i, v); in raw_atomic_fetch_or()
1694 ret = arch_atomic_fetch_or_relaxed(i, v); in raw_atomic_fetch_or()
1705 * @v: pointer to atomic_t
1707 * Atomically updates @v to (@v | @i) with acquire ordering.
1711 * Return: The original value of @v.
1714 raw_atomic_fetch_or_acquire(int i, atomic_t *v) in raw_atomic_fetch_or_acquire() argument
1717 return arch_atomic_fetch_or_acquire(i, v); in raw_atomic_fetch_or_acquire()
1719 int ret = arch_atomic_fetch_or_relaxed(i, v); in raw_atomic_fetch_or_acquire()
1723 return arch_atomic_fetch_or(i, v); in raw_atomic_fetch_or_acquire()
1732 * @v: pointer to atomic_t
1734 * Atomically updates @v to (@v | @i) with release ordering.
1738 * Return: The original value of @v.
1741 raw_atomic_fetch_or_release(int i, atomic_t *v) in raw_atomic_fetch_or_release() argument
1744 return arch_atomic_fetch_or_release(i, v); in raw_atomic_fetch_or_release()
1747 return arch_atomic_fetch_or_relaxed(i, v); in raw_atomic_fetch_or_release()
1749 return arch_atomic_fetch_or(i, v); in raw_atomic_fetch_or_release()
1758 * @v: pointer to atomic_t
1760 * Atomically updates @v to (@v | @i) with relaxed ordering.
1764 * Return: The original value of @v.
1767 raw_atomic_fetch_or_relaxed(int i, atomic_t *v) in raw_atomic_fetch_or_relaxed() argument
1770 return arch_atomic_fetch_or_relaxed(i, v); in raw_atomic_fetch_or_relaxed()
1772 return arch_atomic_fetch_or(i, v); in raw_atomic_fetch_or_relaxed()
1781 * @v: pointer to atomic_t
1783 * Atomically updates @v to (@v ^ @i) with relaxed ordering.
1790 raw_atomic_xor(int i, atomic_t *v) in raw_atomic_xor() argument
1792 arch_atomic_xor(i, v); in raw_atomic_xor()
1798 * @v: pointer to atomic_t
1800 * Atomically updates @v to (@v ^ @i) with full ordering.
1804 * Return: The original value of @v.
1807 raw_atomic_fetch_xor(int i, atomic_t *v) in raw_atomic_fetch_xor() argument
1810 return arch_atomic_fetch_xor(i, v); in raw_atomic_fetch_xor()
1814 ret = arch_atomic_fetch_xor_relaxed(i, v); in raw_atomic_fetch_xor()
1825 * @v: pointer to atomic_t
1827 * Atomically updates @v to (@v ^ @i) with acquire ordering.
1831 * Return: The original value of @v.
1834 raw_atomic_fetch_xor_acquire(int i, atomic_t *v) in raw_atomic_fetch_xor_acquire() argument
1837 return arch_atomic_fetch_xor_acquire(i, v); in raw_atomic_fetch_xor_acquire()
1839 int ret = arch_atomic_fetch_xor_relaxed(i, v); in raw_atomic_fetch_xor_acquire()
1843 return arch_atomic_fetch_xor(i, v); in raw_atomic_fetch_xor_acquire()
1852 * @v: pointer to atomic_t
1854 * Atomically updates @v to (@v ^ @i) with release ordering.
1858 * Return: The original value of @v.
1861 raw_atomic_fetch_xor_release(int i, atomic_t *v) in raw_atomic_fetch_xor_release() argument
1864 return arch_atomic_fetch_xor_release(i, v); in raw_atomic_fetch_xor_release()
1867 return arch_atomic_fetch_xor_relaxed(i, v); in raw_atomic_fetch_xor_release()
1869 return arch_atomic_fetch_xor(i, v); in raw_atomic_fetch_xor_release()
1878 * @v: pointer to atomic_t
1880 * Atomically updates @v to (@v ^ @i) with relaxed ordering.
1884 * Return: The original value of @v.
1887 raw_atomic_fetch_xor_relaxed(int i, atomic_t *v) in raw_atomic_fetch_xor_relaxed() argument
1890 return arch_atomic_fetch_xor_relaxed(i, v); in raw_atomic_fetch_xor_relaxed()
1892 return arch_atomic_fetch_xor(i, v); in raw_atomic_fetch_xor_relaxed()
1900 * @v: pointer to atomic_t
1903 * Atomically updates @v to @new with full ordering.
1907 * Return: The original value of @v.
1910 raw_atomic_xchg(atomic_t *v, int new) in raw_atomic_xchg() argument
1913 return arch_atomic_xchg(v, new); in raw_atomic_xchg()
1917 ret = arch_atomic_xchg_relaxed(v, new); in raw_atomic_xchg()
1921 return raw_xchg(&v->counter, new); in raw_atomic_xchg()
1927 * @v: pointer to atomic_t
1930 * Atomically updates @v to @new with acquire ordering.
1934 * Return: The original value of @v.
1937 raw_atomic_xchg_acquire(atomic_t *v, int new) in raw_atomic_xchg_acquire() argument
1940 return arch_atomic_xchg_acquire(v, new); in raw_atomic_xchg_acquire()
1942 int ret = arch_atomic_xchg_relaxed(v, new); in raw_atomic_xchg_acquire()
1946 return arch_atomic_xchg(v, new); in raw_atomic_xchg_acquire()
1948 return raw_xchg_acquire(&v->counter, new); in raw_atomic_xchg_acquire()
1954 * @v: pointer to atomic_t
1957 * Atomically updates @v to @new with release ordering.
1961 * Return: The original value of @v.
1964 raw_atomic_xchg_release(atomic_t *v, int new) in raw_atomic_xchg_release() argument
1967 return arch_atomic_xchg_release(v, new); in raw_atomic_xchg_release()
1970 return arch_atomic_xchg_relaxed(v, new); in raw_atomic_xchg_release()
1972 return arch_atomic_xchg(v, new); in raw_atomic_xchg_release()
1974 return raw_xchg_release(&v->counter, new); in raw_atomic_xchg_release()
1980 * @v: pointer to atomic_t
1983 * Atomically updates @v to @new with relaxed ordering.
1987 * Return: The original value of @v.
1990 raw_atomic_xchg_relaxed(atomic_t *v, int new) in raw_atomic_xchg_relaxed() argument
1993 return arch_atomic_xchg_relaxed(v, new); in raw_atomic_xchg_relaxed()
1995 return arch_atomic_xchg(v, new); in raw_atomic_xchg_relaxed()
1997 return raw_xchg_relaxed(&v->counter, new); in raw_atomic_xchg_relaxed()
2003 * @v: pointer to atomic_t
2007 * If (@v == @old), atomically updates @v to @new with full ordering.
2008 * Otherwise, @v is not modified and relaxed ordering is provided.
2012 * Return: The original value of @v.
2015 raw_atomic_cmpxchg(atomic_t *v, int old, int new) in raw_atomic_cmpxchg() argument
2018 return arch_atomic_cmpxchg(v, old, new); in raw_atomic_cmpxchg()
2022 ret = arch_atomic_cmpxchg_relaxed(v, old, new); in raw_atomic_cmpxchg()
2026 return raw_cmpxchg(&v->counter, old, new); in raw_atomic_cmpxchg()
2032 * @v: pointer to atomic_t
2036 * If (@v == @old), atomically updates @v to @new with acquire ordering.
2037 * Otherwise, @v is not modified and relaxed ordering is provided.
2041 * Return: The original value of @v.
2044 raw_atomic_cmpxchg_acquire(atomic_t *v, int old, int new) in raw_atomic_cmpxchg_acquire() argument
2047 return arch_atomic_cmpxchg_acquire(v, old, new); in raw_atomic_cmpxchg_acquire()
2049 int ret = arch_atomic_cmpxchg_relaxed(v, old, new); in raw_atomic_cmpxchg_acquire()
2053 return arch_atomic_cmpxchg(v, old, new); in raw_atomic_cmpxchg_acquire()
2055 return raw_cmpxchg_acquire(&v->counter, old, new); in raw_atomic_cmpxchg_acquire()
2061 * @v: pointer to atomic_t
2065 * If (@v == @old), atomically updates @v to @new with release ordering.
2066 * Otherwise, @v is not modified and relaxed ordering is provided.
2070 * Return: The original value of @v.
2073 raw_atomic_cmpxchg_release(atomic_t *v, int old, int new) in raw_atomic_cmpxchg_release() argument
2076 return arch_atomic_cmpxchg_release(v, old, new); in raw_atomic_cmpxchg_release()
2079 return arch_atomic_cmpxchg_relaxed(v, old, new); in raw_atomic_cmpxchg_release()
2081 return arch_atomic_cmpxchg(v, old, new); in raw_atomic_cmpxchg_release()
2083 return raw_cmpxchg_release(&v->counter, old, new); in raw_atomic_cmpxchg_release()
2089 * @v: pointer to atomic_t
2093 * If (@v == @old), atomically updates @v to @new with relaxed ordering.
2094 * Otherwise, @v is not modified and relaxed ordering is provided.
2098 * Return: The original value of @v.
2101 raw_atomic_cmpxchg_relaxed(atomic_t *v, int old, int new) in raw_atomic_cmpxchg_relaxed() argument
2104 return arch_atomic_cmpxchg_relaxed(v, old, new); in raw_atomic_cmpxchg_relaxed()
2106 return arch_atomic_cmpxchg(v, old, new); in raw_atomic_cmpxchg_relaxed()
2108 return raw_cmpxchg_relaxed(&v->counter, old, new); in raw_atomic_cmpxchg_relaxed()
2114 * @v: pointer to atomic_t
2118 * If (@v == @old), atomically updates @v to @new with full ordering.
2119 * Otherwise, @v is not modified, @old is updated to the current value of @v,
2127 raw_atomic_try_cmpxchg(atomic_t *v, int *old, int new) in raw_atomic_try_cmpxchg() argument
2130 return arch_atomic_try_cmpxchg(v, old, new); in raw_atomic_try_cmpxchg()
2134 ret = arch_atomic_try_cmpxchg_relaxed(v, old, new); in raw_atomic_try_cmpxchg()
2139 r = raw_atomic_cmpxchg(v, o, new); in raw_atomic_try_cmpxchg()
2148 * @v: pointer to atomic_t
2152 * If (@v == @old), atomically updates @v to @new with acquire ordering.
2153 * Otherwise, @v is not modified, @old is updated to the current value of @v,
2161 raw_atomic_try_cmpxchg_acquire(atomic_t *v, int *old, int new) in raw_atomic_try_cmpxchg_acquire() argument
2164 return arch_atomic_try_cmpxchg_acquire(v, old, new); in raw_atomic_try_cmpxchg_acquire()
2166 bool ret = arch_atomic_try_cmpxchg_relaxed(v, old, new); in raw_atomic_try_cmpxchg_acquire()
2170 return arch_atomic_try_cmpxchg(v, old, new); in raw_atomic_try_cmpxchg_acquire()
2173 r = raw_atomic_cmpxchg_acquire(v, o, new); in raw_atomic_try_cmpxchg_acquire()
2182 * @v: pointer to atomic_t
2186 * If (@v == @old), atomically updates @v to @new with release ordering.
2187 * Otherwise, @v is not modified, @old is updated to the current value of @v,
2195 raw_atomic_try_cmpxchg_release(atomic_t *v, int *old, int new) in raw_atomic_try_cmpxchg_release() argument
2198 return arch_atomic_try_cmpxchg_release(v, old, new); in raw_atomic_try_cmpxchg_release()
2201 return arch_atomic_try_cmpxchg_relaxed(v, old, new); in raw_atomic_try_cmpxchg_release()
2203 return arch_atomic_try_cmpxchg(v, old, new); in raw_atomic_try_cmpxchg_release()
2206 r = raw_atomic_cmpxchg_release(v, o, new); in raw_atomic_try_cmpxchg_release()
2215 * @v: pointer to atomic_t
2219 * If (@v == @old), atomically updates @v to @new with relaxed ordering.
2220 * Otherwise, @v is not modified, @old is updated to the current value of @v,
2228 raw_atomic_try_cmpxchg_relaxed(atomic_t *v, int *old, int new) in raw_atomic_try_cmpxchg_relaxed() argument
2231 return arch_atomic_try_cmpxchg_relaxed(v, old, new); in raw_atomic_try_cmpxchg_relaxed()
2233 return arch_atomic_try_cmpxchg(v, old, new); in raw_atomic_try_cmpxchg_relaxed()
2236 r = raw_atomic_cmpxchg_relaxed(v, o, new); in raw_atomic_try_cmpxchg_relaxed()
2246 * @v: pointer to atomic_t
2248 * Atomically updates @v to (@v - @i) with full ordering.
2252 * Return: @true if the resulting value of @v is zero, @false otherwise.
2255 raw_atomic_sub_and_test(int i, atomic_t *v) in raw_atomic_sub_and_test() argument
2258 return arch_atomic_sub_and_test(i, v); in raw_atomic_sub_and_test()
2260 return raw_atomic_sub_return(i, v) == 0; in raw_atomic_sub_and_test()
2266 * @v: pointer to atomic_t
2268 * Atomically updates @v to (@v - 1) with full ordering.
2272 * Return: @true if the resulting value of @v is zero, @false otherwise.
2275 raw_atomic_dec_and_test(atomic_t *v) in raw_atomic_dec_and_test() argument
2278 return arch_atomic_dec_and_test(v); in raw_atomic_dec_and_test()
2280 return raw_atomic_dec_return(v) == 0; in raw_atomic_dec_and_test()
2286 * @v: pointer to atomic_t
2288 * Atomically updates @v to (@v + 1) with full ordering.
2292 * Return: @true if the resulting value of @v is zero, @false otherwise.
2295 raw_atomic_inc_and_test(atomic_t *v) in raw_atomic_inc_and_test() argument
2298 return arch_atomic_inc_and_test(v); in raw_atomic_inc_and_test()
2300 return raw_atomic_inc_return(v) == 0; in raw_atomic_inc_and_test()
2307 * @v: pointer to atomic_t
2309 * Atomically updates @v to (@v + @i) with full ordering.
2313 * Return: @true if the resulting value of @v is negative, @false otherwise.
2316 raw_atomic_add_negative(int i, atomic_t *v) in raw_atomic_add_negative() argument
2319 return arch_atomic_add_negative(i, v); in raw_atomic_add_negative()
2323 ret = arch_atomic_add_negative_relaxed(i, v); in raw_atomic_add_negative()
2327 return raw_atomic_add_return(i, v) < 0; in raw_atomic_add_negative()
2334 * @v: pointer to atomic_t
2336 * Atomically updates @v to (@v + @i) with acquire ordering.
2340 * Return: @true if the resulting value of @v is negative, @false otherwise.
2343 raw_atomic_add_negative_acquire(int i, atomic_t *v) in raw_atomic_add_negative_acquire() argument
2346 return arch_atomic_add_negative_acquire(i, v); in raw_atomic_add_negative_acquire()
2348 bool ret = arch_atomic_add_negative_relaxed(i, v); in raw_atomic_add_negative_acquire()
2352 return arch_atomic_add_negative(i, v); in raw_atomic_add_negative_acquire()
2354 return raw_atomic_add_return_acquire(i, v) < 0; in raw_atomic_add_negative_acquire()
2361 * @v: pointer to atomic_t
2363 * Atomically updates @v to (@v + @i) with release ordering.
2367 * Return: @true if the resulting value of @v is negative, @false otherwise.
2370 raw_atomic_add_negative_release(int i, atomic_t *v) in raw_atomic_add_negative_release() argument
2373 return arch_atomic_add_negative_release(i, v); in raw_atomic_add_negative_release()
2376 return arch_atomic_add_negative_relaxed(i, v); in raw_atomic_add_negative_release()
2378 return arch_atomic_add_negative(i, v); in raw_atomic_add_negative_release()
2380 return raw_atomic_add_return_release(i, v) < 0; in raw_atomic_add_negative_release()
2387 * @v: pointer to atomic_t
2389 * Atomically updates @v to (@v + @i) with relaxed ordering.
2393 * Return: @true if the resulting value of @v is negative, @false otherwise.
2396 raw_atomic_add_negative_relaxed(int i, atomic_t *v) in raw_atomic_add_negative_relaxed() argument
2399 return arch_atomic_add_negative_relaxed(i, v); in raw_atomic_add_negative_relaxed()
2401 return arch_atomic_add_negative(i, v); in raw_atomic_add_negative_relaxed()
2403 return raw_atomic_add_return_relaxed(i, v) < 0; in raw_atomic_add_negative_relaxed()
2409 * @v: pointer to atomic_t
2413 * If (@v != @u), atomically updates @v to (@v + @a) with full ordering.
2414 * Otherwise, @v is not modified and relaxed ordering is provided.
2418 * Return: The original value of @v.
2421 raw_atomic_fetch_add_unless(atomic_t *v, int a, int u) in raw_atomic_fetch_add_unless() argument
2424 return arch_atomic_fetch_add_unless(v, a, u); in raw_atomic_fetch_add_unless()
2426 int c = raw_atomic_read(v); in raw_atomic_fetch_add_unless()
2431 } while (!raw_atomic_try_cmpxchg(v, &c, c + a)); in raw_atomic_fetch_add_unless()
2439 * @v: pointer to atomic_t
2443 * If (@v != @u), atomically updates @v to (@v + @a) with full ordering.
2444 * Otherwise, @v is not modified and relaxed ordering is provided.
2448 * Return: @true if @v was updated, @false otherwise.
2451 raw_atomic_add_unless(atomic_t *v, int a, int u) in raw_atomic_add_unless() argument
2454 return arch_atomic_add_unless(v, a, u); in raw_atomic_add_unless()
2456 return raw_atomic_fetch_add_unless(v, a, u) != u; in raw_atomic_add_unless()
2462 * @v: pointer to atomic_t
2464 * If (@v != 0), atomically updates @v to (@v + 1) with full ordering.
2465 * Otherwise, @v is not modified and relaxed ordering is provided.
2469 * Return: @true if @v was updated, @false otherwise.
2472 raw_atomic_inc_not_zero(atomic_t *v) in raw_atomic_inc_not_zero() argument
2475 return arch_atomic_inc_not_zero(v); in raw_atomic_inc_not_zero()
2477 return raw_atomic_add_unless(v, 1, 0); in raw_atomic_inc_not_zero()
2483 * @v: pointer to atomic_t
2485 * If (@v >= 0), atomically updates @v to (@v + 1) with full ordering.
2486 * Otherwise, @v is not modified and relaxed ordering is provided.
2490 * Return: @true if @v was updated, @false otherwise.
2493 raw_atomic_inc_unless_negative(atomic_t *v) in raw_atomic_inc_unless_negative() argument
2496 return arch_atomic_inc_unless_negative(v); in raw_atomic_inc_unless_negative()
2498 int c = raw_atomic_read(v); in raw_atomic_inc_unless_negative()
2503 } while (!raw_atomic_try_cmpxchg(v, &c, c + 1)); in raw_atomic_inc_unless_negative()
2511 * @v: pointer to atomic_t
2513 * If (@v <= 0), atomically updates @v to (@v - 1) with full ordering.
2514 * Otherwise, @v is not modified and relaxed ordering is provided.
2518 * Return: @true if @v was updated, @false otherwise.
2521 raw_atomic_dec_unless_positive(atomic_t *v) in raw_atomic_dec_unless_positive() argument
2524 return arch_atomic_dec_unless_positive(v); in raw_atomic_dec_unless_positive()
2526 int c = raw_atomic_read(v); in raw_atomic_dec_unless_positive()
2531 } while (!raw_atomic_try_cmpxchg(v, &c, c - 1)); in raw_atomic_dec_unless_positive()
2539 * @v: pointer to atomic_t
2541 * If (@v > 0), atomically updates @v to (@v - 1) with full ordering.
2542 * Otherwise, @v is not modified and relaxed ordering is provided.
2546 * Return: The old value of (@v - 1), regardless of whether @v was updated.
2549 raw_atomic_dec_if_positive(atomic_t *v) in raw_atomic_dec_if_positive() argument
2552 return arch_atomic_dec_if_positive(v); in raw_atomic_dec_if_positive()
2554 int dec, c = raw_atomic_read(v); in raw_atomic_dec_if_positive()
2560 } while (!raw_atomic_try_cmpxchg(v, &c, dec)); in raw_atomic_dec_if_positive()
2572 * @v: pointer to atomic64_t
2574 * Atomically loads the value of @v with relaxed ordering.
2578 * Return: The value loaded from @v.
2581 raw_atomic64_read(const atomic64_t *v) in raw_atomic64_read() argument
2583 return arch_atomic64_read(v); in raw_atomic64_read()
2588 * @v: pointer to atomic64_t
2590 * Atomically loads the value of @v with acquire ordering.
2594 * Return: The value loaded from @v.
2597 raw_atomic64_read_acquire(const atomic64_t *v) in raw_atomic64_read_acquire() argument
2600 return arch_atomic64_read_acquire(v); in raw_atomic64_read_acquire()
2605 ret = smp_load_acquire(&(v)->counter); in raw_atomic64_read_acquire()
2607 ret = raw_atomic64_read(v); in raw_atomic64_read_acquire()
2617 * @v: pointer to atomic64_t
2620 * Atomically sets @v to @i with relaxed ordering.
2627 raw_atomic64_set(atomic64_t *v, s64 i) in raw_atomic64_set() argument
2629 arch_atomic64_set(v, i); in raw_atomic64_set()
2634 * @v: pointer to atomic64_t
2637 * Atomically sets @v to @i with release ordering.
2644 raw_atomic64_set_release(atomic64_t *v, s64 i) in raw_atomic64_set_release() argument
2647 arch_atomic64_set_release(v, i); in raw_atomic64_set_release()
2650 smp_store_release(&(v)->counter, i); in raw_atomic64_set_release()
2653 raw_atomic64_set(v, i); in raw_atomic64_set_release()
2661 * @v: pointer to atomic64_t
2663 * Atomically updates @v to (@v + @i) with relaxed ordering.
2670 raw_atomic64_add(s64 i, atomic64_t *v) in raw_atomic64_add() argument
2672 arch_atomic64_add(i, v); in raw_atomic64_add()
2678 * @v: pointer to atomic64_t
2680 * Atomically updates @v to (@v + @i) with full ordering.
2684 * Return: The updated value of @v.
2687 raw_atomic64_add_return(s64 i, atomic64_t *v) in raw_atomic64_add_return() argument
2690 return arch_atomic64_add_return(i, v); in raw_atomic64_add_return()
2694 ret = arch_atomic64_add_return_relaxed(i, v); in raw_atomic64_add_return()
2705 * @v: pointer to atomic64_t
2707 * Atomically updates @v to (@v + @i) with acquire ordering.
2711 * Return: The updated value of @v.
2714 raw_atomic64_add_return_acquire(s64 i, atomic64_t *v) in raw_atomic64_add_return_acquire() argument
2717 return arch_atomic64_add_return_acquire(i, v); in raw_atomic64_add_return_acquire()
2719 s64 ret = arch_atomic64_add_return_relaxed(i, v); in raw_atomic64_add_return_acquire()
2723 return arch_atomic64_add_return(i, v); in raw_atomic64_add_return_acquire()
2732 * @v: pointer to atomic64_t
2734 * Atomically updates @v to (@v + @i) with release ordering.
2738 * Return: The updated value of @v.
2741 raw_atomic64_add_return_release(s64 i, atomic64_t *v) in raw_atomic64_add_return_release() argument
2744 return arch_atomic64_add_return_release(i, v); in raw_atomic64_add_return_release()
2747 return arch_atomic64_add_return_relaxed(i, v); in raw_atomic64_add_return_release()
2749 return arch_atomic64_add_return(i, v); in raw_atomic64_add_return_release()
2758 * @v: pointer to atomic64_t
2760 * Atomically updates @v to (@v + @i) with relaxed ordering.
2764 * Return: The updated value of @v.
2767 raw_atomic64_add_return_relaxed(s64 i, atomic64_t *v) in raw_atomic64_add_return_relaxed() argument
2770 return arch_atomic64_add_return_relaxed(i, v); in raw_atomic64_add_return_relaxed()
2772 return arch_atomic64_add_return(i, v); in raw_atomic64_add_return_relaxed()
2781 * @v: pointer to atomic64_t
2783 * Atomically updates @v to (@v + @i) with full ordering.
2787 * Return: The original value of @v.
2790 raw_atomic64_fetch_add(s64 i, atomic64_t *v) in raw_atomic64_fetch_add() argument
2793 return arch_atomic64_fetch_add(i, v); in raw_atomic64_fetch_add()
2797 ret = arch_atomic64_fetch_add_relaxed(i, v); in raw_atomic64_fetch_add()
2808 * @v: pointer to atomic64_t
2810 * Atomically updates @v to (@v + @i) with acquire ordering.
2814 * Return: The original value of @v.
2817 raw_atomic64_fetch_add_acquire(s64 i, atomic64_t *v) in raw_atomic64_fetch_add_acquire() argument
2820 return arch_atomic64_fetch_add_acquire(i, v); in raw_atomic64_fetch_add_acquire()
2822 s64 ret = arch_atomic64_fetch_add_relaxed(i, v); in raw_atomic64_fetch_add_acquire()
2826 return arch_atomic64_fetch_add(i, v); in raw_atomic64_fetch_add_acquire()
2835 * @v: pointer to atomic64_t
2837 * Atomically updates @v to (@v + @i) with release ordering.
2841 * Return: The original value of @v.
2844 raw_atomic64_fetch_add_release(s64 i, atomic64_t *v) in raw_atomic64_fetch_add_release() argument
2847 return arch_atomic64_fetch_add_release(i, v); in raw_atomic64_fetch_add_release()
2850 return arch_atomic64_fetch_add_relaxed(i, v); in raw_atomic64_fetch_add_release()
2852 return arch_atomic64_fetch_add(i, v); in raw_atomic64_fetch_add_release()
2861 * @v: pointer to atomic64_t
2863 * Atomically updates @v to (@v + @i) with relaxed ordering.
2867 * Return: The original value of @v.
2870 raw_atomic64_fetch_add_relaxed(s64 i, atomic64_t *v) in raw_atomic64_fetch_add_relaxed() argument
2873 return arch_atomic64_fetch_add_relaxed(i, v); in raw_atomic64_fetch_add_relaxed()
2875 return arch_atomic64_fetch_add(i, v); in raw_atomic64_fetch_add_relaxed()
2884 * @v: pointer to atomic64_t
2886 * Atomically updates @v to (@v - @i) with relaxed ordering.
2893 raw_atomic64_sub(s64 i, atomic64_t *v) in raw_atomic64_sub() argument
2895 arch_atomic64_sub(i, v); in raw_atomic64_sub()
2901 * @v: pointer to atomic64_t
2903 * Atomically updates @v to (@v - @i) with full ordering.
2907 * Return: The updated value of @v.
2910 raw_atomic64_sub_return(s64 i, atomic64_t *v) in raw_atomic64_sub_return() argument
2913 return arch_atomic64_sub_return(i, v); in raw_atomic64_sub_return()
2917 ret = arch_atomic64_sub_return_relaxed(i, v); in raw_atomic64_sub_return()
2928 * @v: pointer to atomic64_t
2930 * Atomically updates @v to (@v - @i) with acquire ordering.
2934 * Return: The updated value of @v.
2937 raw_atomic64_sub_return_acquire(s64 i, atomic64_t *v) in raw_atomic64_sub_return_acquire() argument
2940 return arch_atomic64_sub_return_acquire(i, v); in raw_atomic64_sub_return_acquire()
2942 s64 ret = arch_atomic64_sub_return_relaxed(i, v); in raw_atomic64_sub_return_acquire()
2946 return arch_atomic64_sub_return(i, v); in raw_atomic64_sub_return_acquire()
2955 * @v: pointer to atomic64_t
2957 * Atomically updates @v to (@v - @i) with release ordering.
2961 * Return: The updated value of @v.
2964 raw_atomic64_sub_return_release(s64 i, atomic64_t *v) in raw_atomic64_sub_return_release() argument
2967 return arch_atomic64_sub_return_release(i, v); in raw_atomic64_sub_return_release()
2970 return arch_atomic64_sub_return_relaxed(i, v); in raw_atomic64_sub_return_release()
2972 return arch_atomic64_sub_return(i, v); in raw_atomic64_sub_return_release()
2981 * @v: pointer to atomic64_t
2983 * Atomically updates @v to (@v - @i) with relaxed ordering.
2987 * Return: The updated value of @v.
2990 raw_atomic64_sub_return_relaxed(s64 i, atomic64_t *v) in raw_atomic64_sub_return_relaxed() argument
2993 return arch_atomic64_sub_return_relaxed(i, v); in raw_atomic64_sub_return_relaxed()
2995 return arch_atomic64_sub_return(i, v); in raw_atomic64_sub_return_relaxed()
3004 * @v: pointer to atomic64_t
3006 * Atomically updates @v to (@v - @i) with full ordering.
3010 * Return: The original value of @v.
3013 raw_atomic64_fetch_sub(s64 i, atomic64_t *v) in raw_atomic64_fetch_sub() argument
3016 return arch_atomic64_fetch_sub(i, v); in raw_atomic64_fetch_sub()
3020 ret = arch_atomic64_fetch_sub_relaxed(i, v); in raw_atomic64_fetch_sub()
3031 * @v: pointer to atomic64_t
3033 * Atomically updates @v to (@v - @i) with acquire ordering.
3037 * Return: The original value of @v.
3040 raw_atomic64_fetch_sub_acquire(s64 i, atomic64_t *v) in raw_atomic64_fetch_sub_acquire() argument
3043 return arch_atomic64_fetch_sub_acquire(i, v); in raw_atomic64_fetch_sub_acquire()
3045 s64 ret = arch_atomic64_fetch_sub_relaxed(i, v); in raw_atomic64_fetch_sub_acquire()
3049 return arch_atomic64_fetch_sub(i, v); in raw_atomic64_fetch_sub_acquire()
3058 * @v: pointer to atomic64_t
3060 * Atomically updates @v to (@v - @i) with release ordering.
3064 * Return: The original value of @v.
3067 raw_atomic64_fetch_sub_release(s64 i, atomic64_t *v) in raw_atomic64_fetch_sub_release() argument
3070 return arch_atomic64_fetch_sub_release(i, v); in raw_atomic64_fetch_sub_release()
3073 return arch_atomic64_fetch_sub_relaxed(i, v); in raw_atomic64_fetch_sub_release()
3075 return arch_atomic64_fetch_sub(i, v); in raw_atomic64_fetch_sub_release()
3084 * @v: pointer to atomic64_t
3086 * Atomically updates @v to (@v - @i) with relaxed ordering.
3090 * Return: The original value of @v.
3093 raw_atomic64_fetch_sub_relaxed(s64 i, atomic64_t *v) in raw_atomic64_fetch_sub_relaxed() argument
3096 return arch_atomic64_fetch_sub_relaxed(i, v); in raw_atomic64_fetch_sub_relaxed()
3098 return arch_atomic64_fetch_sub(i, v); in raw_atomic64_fetch_sub_relaxed()
3106 * @v: pointer to atomic64_t
3108 * Atomically updates @v to (@v + 1) with relaxed ordering.
3115 raw_atomic64_inc(atomic64_t *v) in raw_atomic64_inc() argument
3118 arch_atomic64_inc(v); in raw_atomic64_inc()
3120 raw_atomic64_add(1, v); in raw_atomic64_inc()
3126 * @v: pointer to atomic64_t
3128 * Atomically updates @v to (@v + 1) with full ordering.
3132 * Return: The updated value of @v.
3135 raw_atomic64_inc_return(atomic64_t *v) in raw_atomic64_inc_return() argument
3138 return arch_atomic64_inc_return(v); in raw_atomic64_inc_return()
3142 ret = arch_atomic64_inc_return_relaxed(v); in raw_atomic64_inc_return()
3146 return raw_atomic64_add_return(1, v); in raw_atomic64_inc_return()
3152 * @v: pointer to atomic64_t
3154 * Atomically updates @v to (@v + 1) with acquire ordering.
3158 * Return: The updated value of @v.
3161 raw_atomic64_inc_return_acquire(atomic64_t *v) in raw_atomic64_inc_return_acquire() argument
3164 return arch_atomic64_inc_return_acquire(v); in raw_atomic64_inc_return_acquire()
3166 s64 ret = arch_atomic64_inc_return_relaxed(v); in raw_atomic64_inc_return_acquire()
3170 return arch_atomic64_inc_return(v); in raw_atomic64_inc_return_acquire()
3172 return raw_atomic64_add_return_acquire(1, v); in raw_atomic64_inc_return_acquire()
3178 * @v: pointer to atomic64_t
3180 * Atomically updates @v to (@v + 1) with release ordering.
3184 * Return: The updated value of @v.
3187 raw_atomic64_inc_return_release(atomic64_t *v) in raw_atomic64_inc_return_release() argument
3190 return arch_atomic64_inc_return_release(v); in raw_atomic64_inc_return_release()
3193 return arch_atomic64_inc_return_relaxed(v); in raw_atomic64_inc_return_release()
3195 return arch_atomic64_inc_return(v); in raw_atomic64_inc_return_release()
3197 return raw_atomic64_add_return_release(1, v); in raw_atomic64_inc_return_release()
3203 * @v: pointer to atomic64_t
3205 * Atomically updates @v to (@v + 1) with relaxed ordering.
3209 * Return: The updated value of @v.
3212 raw_atomic64_inc_return_relaxed(atomic64_t *v) in raw_atomic64_inc_return_relaxed() argument
3215 return arch_atomic64_inc_return_relaxed(v); in raw_atomic64_inc_return_relaxed()
3217 return arch_atomic64_inc_return(v); in raw_atomic64_inc_return_relaxed()
3219 return raw_atomic64_add_return_relaxed(1, v); in raw_atomic64_inc_return_relaxed()
3225 * @v: pointer to atomic64_t
3227 * Atomically updates @v to (@v + 1) with full ordering.
3231 * Return: The original value of @v.
3234 raw_atomic64_fetch_inc(atomic64_t *v) in raw_atomic64_fetch_inc() argument
3237 return arch_atomic64_fetch_inc(v); in raw_atomic64_fetch_inc()
3241 ret = arch_atomic64_fetch_inc_relaxed(v); in raw_atomic64_fetch_inc()
3245 return raw_atomic64_fetch_add(1, v); in raw_atomic64_fetch_inc()
3251 * @v: pointer to atomic64_t
3253 * Atomically updates @v to (@v + 1) with acquire ordering.
3257 * Return: The original value of @v.
3260 raw_atomic64_fetch_inc_acquire(atomic64_t *v) in raw_atomic64_fetch_inc_acquire() argument
3263 return arch_atomic64_fetch_inc_acquire(v); in raw_atomic64_fetch_inc_acquire()
3265 s64 ret = arch_atomic64_fetch_inc_relaxed(v); in raw_atomic64_fetch_inc_acquire()
3269 return arch_atomic64_fetch_inc(v); in raw_atomic64_fetch_inc_acquire()
3271 return raw_atomic64_fetch_add_acquire(1, v); in raw_atomic64_fetch_inc_acquire()
3277 * @v: pointer to atomic64_t
3279 * Atomically updates @v to (@v + 1) with release ordering.
3283 * Return: The original value of @v.
3286 raw_atomic64_fetch_inc_release(atomic64_t *v) in raw_atomic64_fetch_inc_release() argument
3289 return arch_atomic64_fetch_inc_release(v); in raw_atomic64_fetch_inc_release()
3292 return arch_atomic64_fetch_inc_relaxed(v); in raw_atomic64_fetch_inc_release()
3294 return arch_atomic64_fetch_inc(v); in raw_atomic64_fetch_inc_release()
3296 return raw_atomic64_fetch_add_release(1, v); in raw_atomic64_fetch_inc_release()
3302 * @v: pointer to atomic64_t
3304 * Atomically updates @v to (@v + 1) with relaxed ordering.
3308 * Return: The original value of @v.
3311 raw_atomic64_fetch_inc_relaxed(atomic64_t *v) in raw_atomic64_fetch_inc_relaxed() argument
3314 return arch_atomic64_fetch_inc_relaxed(v); in raw_atomic64_fetch_inc_relaxed()
3316 return arch_atomic64_fetch_inc(v); in raw_atomic64_fetch_inc_relaxed()
3318 return raw_atomic64_fetch_add_relaxed(1, v); in raw_atomic64_fetch_inc_relaxed()
3324 * @v: pointer to atomic64_t
3326 * Atomically updates @v to (@v - 1) with relaxed ordering.
3333 raw_atomic64_dec(atomic64_t *v) in raw_atomic64_dec() argument
3336 arch_atomic64_dec(v); in raw_atomic64_dec()
3338 raw_atomic64_sub(1, v); in raw_atomic64_dec()
3344 * @v: pointer to atomic64_t
3346 * Atomically updates @v to (@v - 1) with full ordering.
3350 * Return: The updated value of @v.
3353 raw_atomic64_dec_return(atomic64_t *v) in raw_atomic64_dec_return() argument
3356 return arch_atomic64_dec_return(v); in raw_atomic64_dec_return()
3360 ret = arch_atomic64_dec_return_relaxed(v); in raw_atomic64_dec_return()
3364 return raw_atomic64_sub_return(1, v); in raw_atomic64_dec_return()
3370 * @v: pointer to atomic64_t
3372 * Atomically updates @v to (@v - 1) with acquire ordering.
3376 * Return: The updated value of @v.
3379 raw_atomic64_dec_return_acquire(atomic64_t *v) in raw_atomic64_dec_return_acquire() argument
3382 return arch_atomic64_dec_return_acquire(v); in raw_atomic64_dec_return_acquire()
3384 s64 ret = arch_atomic64_dec_return_relaxed(v); in raw_atomic64_dec_return_acquire()
3388 return arch_atomic64_dec_return(v); in raw_atomic64_dec_return_acquire()
3390 return raw_atomic64_sub_return_acquire(1, v); in raw_atomic64_dec_return_acquire()
3396 * @v: pointer to atomic64_t
3398 * Atomically updates @v to (@v - 1) with release ordering.
3402 * Return: The updated value of @v.
3405 raw_atomic64_dec_return_release(atomic64_t *v) in raw_atomic64_dec_return_release() argument
3408 return arch_atomic64_dec_return_release(v); in raw_atomic64_dec_return_release()
3411 return arch_atomic64_dec_return_relaxed(v); in raw_atomic64_dec_return_release()
3413 return arch_atomic64_dec_return(v); in raw_atomic64_dec_return_release()
3415 return raw_atomic64_sub_return_release(1, v); in raw_atomic64_dec_return_release()
3421 * @v: pointer to atomic64_t
3423 * Atomically updates @v to (@v - 1) with relaxed ordering.
3427 * Return: The updated value of @v.
3430 raw_atomic64_dec_return_relaxed(atomic64_t *v) in raw_atomic64_dec_return_relaxed() argument
3433 return arch_atomic64_dec_return_relaxed(v); in raw_atomic64_dec_return_relaxed()
3435 return arch_atomic64_dec_return(v); in raw_atomic64_dec_return_relaxed()
3437 return raw_atomic64_sub_return_relaxed(1, v); in raw_atomic64_dec_return_relaxed()
3443 * @v: pointer to atomic64_t
3445 * Atomically updates @v to (@v - 1) with full ordering.
3449 * Return: The original value of @v.
3452 raw_atomic64_fetch_dec(atomic64_t *v) in raw_atomic64_fetch_dec() argument
3455 return arch_atomic64_fetch_dec(v); in raw_atomic64_fetch_dec()
3459 ret = arch_atomic64_fetch_dec_relaxed(v); in raw_atomic64_fetch_dec()
3463 return raw_atomic64_fetch_sub(1, v); in raw_atomic64_fetch_dec()
3469 * @v: pointer to atomic64_t
3471 * Atomically updates @v to (@v - 1) with acquire ordering.
3475 * Return: The original value of @v.
3478 raw_atomic64_fetch_dec_acquire(atomic64_t *v) in raw_atomic64_fetch_dec_acquire() argument
3481 return arch_atomic64_fetch_dec_acquire(v); in raw_atomic64_fetch_dec_acquire()
3483 s64 ret = arch_atomic64_fetch_dec_relaxed(v); in raw_atomic64_fetch_dec_acquire()
3487 return arch_atomic64_fetch_dec(v); in raw_atomic64_fetch_dec_acquire()
3489 return raw_atomic64_fetch_sub_acquire(1, v); in raw_atomic64_fetch_dec_acquire()
3495 * @v: pointer to atomic64_t
3497 * Atomically updates @v to (@v - 1) with release ordering.
3501 * Return: The original value of @v.
3504 raw_atomic64_fetch_dec_release(atomic64_t *v) in raw_atomic64_fetch_dec_release() argument
3507 return arch_atomic64_fetch_dec_release(v); in raw_atomic64_fetch_dec_release()
3510 return arch_atomic64_fetch_dec_relaxed(v); in raw_atomic64_fetch_dec_release()
3512 return arch_atomic64_fetch_dec(v); in raw_atomic64_fetch_dec_release()
3514 return raw_atomic64_fetch_sub_release(1, v); in raw_atomic64_fetch_dec_release()
3520 * @v: pointer to atomic64_t
3522 * Atomically updates @v to (@v - 1) with relaxed ordering.
3526 * Return: The original value of @v.
3529 raw_atomic64_fetch_dec_relaxed(atomic64_t *v) in raw_atomic64_fetch_dec_relaxed() argument
3532 return arch_atomic64_fetch_dec_relaxed(v); in raw_atomic64_fetch_dec_relaxed()
3534 return arch_atomic64_fetch_dec(v); in raw_atomic64_fetch_dec_relaxed()
3536 return raw_atomic64_fetch_sub_relaxed(1, v); in raw_atomic64_fetch_dec_relaxed()
3543 * @v: pointer to atomic64_t
3545 * Atomically updates @v to (@v & @i) with relaxed ordering.
3552 raw_atomic64_and(s64 i, atomic64_t *v) in raw_atomic64_and() argument
3554 arch_atomic64_and(i, v); in raw_atomic64_and()
3560 * @v: pointer to atomic64_t
3562 * Atomically updates @v to (@v & @i) with full ordering.
3566 * Return: The original value of @v.
3569 raw_atomic64_fetch_and(s64 i, atomic64_t *v) in raw_atomic64_fetch_and() argument
3572 return arch_atomic64_fetch_and(i, v); in raw_atomic64_fetch_and()
3576 ret = arch_atomic64_fetch_and_relaxed(i, v); in raw_atomic64_fetch_and()
3587 * @v: pointer to atomic64_t
3589 * Atomically updates @v to (@v & @i) with acquire ordering.
3593 * Return: The original value of @v.
3596 raw_atomic64_fetch_and_acquire(s64 i, atomic64_t *v) in raw_atomic64_fetch_and_acquire() argument
3599 return arch_atomic64_fetch_and_acquire(i, v); in raw_atomic64_fetch_and_acquire()
3601 s64 ret = arch_atomic64_fetch_and_relaxed(i, v); in raw_atomic64_fetch_and_acquire()
3605 return arch_atomic64_fetch_and(i, v); in raw_atomic64_fetch_and_acquire()
3614 * @v: pointer to atomic64_t
3616 * Atomically updates @v to (@v & @i) with release ordering.
3620 * Return: The original value of @v.
3623 raw_atomic64_fetch_and_release(s64 i, atomic64_t *v) in raw_atomic64_fetch_and_release() argument
3626 return arch_atomic64_fetch_and_release(i, v); in raw_atomic64_fetch_and_release()
3629 return arch_atomic64_fetch_and_relaxed(i, v); in raw_atomic64_fetch_and_release()
3631 return arch_atomic64_fetch_and(i, v); in raw_atomic64_fetch_and_release()
3640 * @v: pointer to atomic64_t
3642 * Atomically updates @v to (@v & @i) with relaxed ordering.
3646 * Return: The original value of @v.
3649 raw_atomic64_fetch_and_relaxed(s64 i, atomic64_t *v) in raw_atomic64_fetch_and_relaxed() argument
3652 return arch_atomic64_fetch_and_relaxed(i, v); in raw_atomic64_fetch_and_relaxed()
3654 return arch_atomic64_fetch_and(i, v); in raw_atomic64_fetch_and_relaxed()
3663 * @v: pointer to atomic64_t
3665 * Atomically updates @v to (@v & ~@i) with relaxed ordering.
3672 raw_atomic64_andnot(s64 i, atomic64_t *v) in raw_atomic64_andnot() argument
3675 arch_atomic64_andnot(i, v); in raw_atomic64_andnot()
3677 raw_atomic64_and(~i, v); in raw_atomic64_andnot()
3684 * @v: pointer to atomic64_t
3686 * Atomically updates @v to (@v & ~@i) with full ordering.
3690 * Return: The original value of @v.
3693 raw_atomic64_fetch_andnot(s64 i, atomic64_t *v) in raw_atomic64_fetch_andnot() argument
3696 return arch_atomic64_fetch_andnot(i, v); in raw_atomic64_fetch_andnot()
3700 ret = arch_atomic64_fetch_andnot_relaxed(i, v); in raw_atomic64_fetch_andnot()
3704 return raw_atomic64_fetch_and(~i, v); in raw_atomic64_fetch_andnot()
3711 * @v: pointer to atomic64_t
3713 * Atomically updates @v to (@v & ~@i) with acquire ordering.
3717 * Return: The original value of @v.
3720 raw_atomic64_fetch_andnot_acquire(s64 i, atomic64_t *v) in raw_atomic64_fetch_andnot_acquire() argument
3723 return arch_atomic64_fetch_andnot_acquire(i, v); in raw_atomic64_fetch_andnot_acquire()
3725 s64 ret = arch_atomic64_fetch_andnot_relaxed(i, v); in raw_atomic64_fetch_andnot_acquire()
3729 return arch_atomic64_fetch_andnot(i, v); in raw_atomic64_fetch_andnot_acquire()
3731 return raw_atomic64_fetch_and_acquire(~i, v); in raw_atomic64_fetch_andnot_acquire()
3738 * @v: pointer to atomic64_t
3740 * Atomically updates @v to (@v & ~@i) with release ordering.
3744 * Return: The original value of @v.
3747 raw_atomic64_fetch_andnot_release(s64 i, atomic64_t *v) in raw_atomic64_fetch_andnot_release() argument
3750 return arch_atomic64_fetch_andnot_release(i, v); in raw_atomic64_fetch_andnot_release()
3753 return arch_atomic64_fetch_andnot_relaxed(i, v); in raw_atomic64_fetch_andnot_release()
3755 return arch_atomic64_fetch_andnot(i, v); in raw_atomic64_fetch_andnot_release()
3757 return raw_atomic64_fetch_and_release(~i, v); in raw_atomic64_fetch_andnot_release()
3764 * @v: pointer to atomic64_t
3766 * Atomically updates @v to (@v & ~@i) with relaxed ordering.
3770 * Return: The original value of @v.
3773 raw_atomic64_fetch_andnot_relaxed(s64 i, atomic64_t *v) in raw_atomic64_fetch_andnot_relaxed() argument
3776 return arch_atomic64_fetch_andnot_relaxed(i, v); in raw_atomic64_fetch_andnot_relaxed()
3778 return arch_atomic64_fetch_andnot(i, v); in raw_atomic64_fetch_andnot_relaxed()
3780 return raw_atomic64_fetch_and_relaxed(~i, v); in raw_atomic64_fetch_andnot_relaxed()
3787 * @v: pointer to atomic64_t
3789 * Atomically updates @v to (@v | @i) with relaxed ordering.
3796 raw_atomic64_or(s64 i, atomic64_t *v) in raw_atomic64_or() argument
3798 arch_atomic64_or(i, v); in raw_atomic64_or()
3804 * @v: pointer to atomic64_t
3806 * Atomically updates @v to (@v | @i) with full ordering.
3810 * Return: The original value of @v.
3813 raw_atomic64_fetch_or(s64 i, atomic64_t *v) in raw_atomic64_fetch_or() argument
3816 return arch_atomic64_fetch_or(i, v); in raw_atomic64_fetch_or()
3820 ret = arch_atomic64_fetch_or_relaxed(i, v); in raw_atomic64_fetch_or()
3831 * @v: pointer to atomic64_t
3833 * Atomically updates @v to (@v | @i) with acquire ordering.
3837 * Return: The original value of @v.
3840 raw_atomic64_fetch_or_acquire(s64 i, atomic64_t *v) in raw_atomic64_fetch_or_acquire() argument
3843 return arch_atomic64_fetch_or_acquire(i, v); in raw_atomic64_fetch_or_acquire()
3845 s64 ret = arch_atomic64_fetch_or_relaxed(i, v); in raw_atomic64_fetch_or_acquire()
3849 return arch_atomic64_fetch_or(i, v); in raw_atomic64_fetch_or_acquire()
3858 * @v: pointer to atomic64_t
3860 * Atomically updates @v to (@v | @i) with release ordering.
3864 * Return: The original value of @v.
3867 raw_atomic64_fetch_or_release(s64 i, atomic64_t *v) in raw_atomic64_fetch_or_release() argument
3870 return arch_atomic64_fetch_or_release(i, v); in raw_atomic64_fetch_or_release()
3873 return arch_atomic64_fetch_or_relaxed(i, v); in raw_atomic64_fetch_or_release()
3875 return arch_atomic64_fetch_or(i, v); in raw_atomic64_fetch_or_release()
3884 * @v: pointer to atomic64_t
3886 * Atomically updates @v to (@v | @i) with relaxed ordering.
3890 * Return: The original value of @v.
3893 raw_atomic64_fetch_or_relaxed(s64 i, atomic64_t *v) in raw_atomic64_fetch_or_relaxed() argument
3896 return arch_atomic64_fetch_or_relaxed(i, v); in raw_atomic64_fetch_or_relaxed()
3898 return arch_atomic64_fetch_or(i, v); in raw_atomic64_fetch_or_relaxed()
3907 * @v: pointer to atomic64_t
3909 * Atomically updates @v to (@v ^ @i) with relaxed ordering.
3916 raw_atomic64_xor(s64 i, atomic64_t *v) in raw_atomic64_xor() argument
3918 arch_atomic64_xor(i, v); in raw_atomic64_xor()
3924 * @v: pointer to atomic64_t
3926 * Atomically updates @v to (@v ^ @i) with full ordering.
3930 * Return: The original value of @v.
3933 raw_atomic64_fetch_xor(s64 i, atomic64_t *v) in raw_atomic64_fetch_xor() argument
3936 return arch_atomic64_fetch_xor(i, v); in raw_atomic64_fetch_xor()
3940 ret = arch_atomic64_fetch_xor_relaxed(i, v); in raw_atomic64_fetch_xor()
3951 * @v: pointer to atomic64_t
3953 * Atomically updates @v to (@v ^ @i) with acquire ordering.
3957 * Return: The original value of @v.
3960 raw_atomic64_fetch_xor_acquire(s64 i, atomic64_t *v) in raw_atomic64_fetch_xor_acquire() argument
3963 return arch_atomic64_fetch_xor_acquire(i, v); in raw_atomic64_fetch_xor_acquire()
3965 s64 ret = arch_atomic64_fetch_xor_relaxed(i, v); in raw_atomic64_fetch_xor_acquire()
3969 return arch_atomic64_fetch_xor(i, v); in raw_atomic64_fetch_xor_acquire()
3978 * @v: pointer to atomic64_t
3980 * Atomically updates @v to (@v ^ @i) with release ordering.
3984 * Return: The original value of @v.
3987 raw_atomic64_fetch_xor_release(s64 i, atomic64_t *v) in raw_atomic64_fetch_xor_release() argument
3990 return arch_atomic64_fetch_xor_release(i, v); in raw_atomic64_fetch_xor_release()
3993 return arch_atomic64_fetch_xor_relaxed(i, v); in raw_atomic64_fetch_xor_release()
3995 return arch_atomic64_fetch_xor(i, v); in raw_atomic64_fetch_xor_release()
4004 * @v: pointer to atomic64_t
4006 * Atomically updates @v to (@v ^ @i) with relaxed ordering.
4010 * Return: The original value of @v.
4013 raw_atomic64_fetch_xor_relaxed(s64 i, atomic64_t *v) in raw_atomic64_fetch_xor_relaxed() argument
4016 return arch_atomic64_fetch_xor_relaxed(i, v); in raw_atomic64_fetch_xor_relaxed()
4018 return arch_atomic64_fetch_xor(i, v); in raw_atomic64_fetch_xor_relaxed()
4026 * @v: pointer to atomic64_t
4029 * Atomically updates @v to @new with full ordering.
4033 * Return: The original value of @v.
4036 raw_atomic64_xchg(atomic64_t *v, s64 new) in raw_atomic64_xchg() argument
4039 return arch_atomic64_xchg(v, new); in raw_atomic64_xchg()
4043 ret = arch_atomic64_xchg_relaxed(v, new); in raw_atomic64_xchg()
4047 return raw_xchg(&v->counter, new); in raw_atomic64_xchg()
4053 * @v: pointer to atomic64_t
4056 * Atomically updates @v to @new with acquire ordering.
4060 * Return: The original value of @v.
4063 raw_atomic64_xchg_acquire(atomic64_t *v, s64 new) in raw_atomic64_xchg_acquire() argument
4066 return arch_atomic64_xchg_acquire(v, new); in raw_atomic64_xchg_acquire()
4068 s64 ret = arch_atomic64_xchg_relaxed(v, new); in raw_atomic64_xchg_acquire()
4072 return arch_atomic64_xchg(v, new); in raw_atomic64_xchg_acquire()
4074 return raw_xchg_acquire(&v->counter, new); in raw_atomic64_xchg_acquire()
4080 * @v: pointer to atomic64_t
4083 * Atomically updates @v to @new with release ordering.
4087 * Return: The original value of @v.
4090 raw_atomic64_xchg_release(atomic64_t *v, s64 new) in raw_atomic64_xchg_release() argument
4093 return arch_atomic64_xchg_release(v, new); in raw_atomic64_xchg_release()
4096 return arch_atomic64_xchg_relaxed(v, new); in raw_atomic64_xchg_release()
4098 return arch_atomic64_xchg(v, new); in raw_atomic64_xchg_release()
4100 return raw_xchg_release(&v->counter, new); in raw_atomic64_xchg_release()
4106 * @v: pointer to atomic64_t
4109 * Atomically updates @v to @new with relaxed ordering.
4113 * Return: The original value of @v.
4116 raw_atomic64_xchg_relaxed(atomic64_t *v, s64 new) in raw_atomic64_xchg_relaxed() argument
4119 return arch_atomic64_xchg_relaxed(v, new); in raw_atomic64_xchg_relaxed()
4121 return arch_atomic64_xchg(v, new); in raw_atomic64_xchg_relaxed()
4123 return raw_xchg_relaxed(&v->counter, new); in raw_atomic64_xchg_relaxed()
4129 * @v: pointer to atomic64_t
4133 * If (@v == @old), atomically updates @v to @new with full ordering.
4134 * Otherwise, @v is not modified and relaxed ordering is provided.
4138 * Return: The original value of @v.
4141 raw_atomic64_cmpxchg(atomic64_t *v, s64 old, s64 new) in raw_atomic64_cmpxchg() argument
4144 return arch_atomic64_cmpxchg(v, old, new); in raw_atomic64_cmpxchg()
4148 ret = arch_atomic64_cmpxchg_relaxed(v, old, new); in raw_atomic64_cmpxchg()
4152 return raw_cmpxchg(&v->counter, old, new); in raw_atomic64_cmpxchg()
4158 * @v: pointer to atomic64_t
4162 * If (@v == @old), atomically updates @v to @new with acquire ordering.
4163 * Otherwise, @v is not modified and relaxed ordering is provided.
4167 * Return: The original value of @v.
4170 raw_atomic64_cmpxchg_acquire(atomic64_t *v, s64 old, s64 new) in raw_atomic64_cmpxchg_acquire() argument
4173 return arch_atomic64_cmpxchg_acquire(v, old, new); in raw_atomic64_cmpxchg_acquire()
4175 s64 ret = arch_atomic64_cmpxchg_relaxed(v, old, new); in raw_atomic64_cmpxchg_acquire()
4179 return arch_atomic64_cmpxchg(v, old, new); in raw_atomic64_cmpxchg_acquire()
4181 return raw_cmpxchg_acquire(&v->counter, old, new); in raw_atomic64_cmpxchg_acquire()
4187 * @v: pointer to atomic64_t
4191 * If (@v == @old), atomically updates @v to @new with release ordering.
4192 * Otherwise, @v is not modified and relaxed ordering is provided.
4196 * Return: The original value of @v.
4199 raw_atomic64_cmpxchg_release(atomic64_t *v, s64 old, s64 new) in raw_atomic64_cmpxchg_release() argument
4202 return arch_atomic64_cmpxchg_release(v, old, new); in raw_atomic64_cmpxchg_release()
4205 return arch_atomic64_cmpxchg_relaxed(v, old, new); in raw_atomic64_cmpxchg_release()
4207 return arch_atomic64_cmpxchg(v, old, new); in raw_atomic64_cmpxchg_release()
4209 return raw_cmpxchg_release(&v->counter, old, new); in raw_atomic64_cmpxchg_release()
4215 * @v: pointer to atomic64_t
4219 * If (@v == @old), atomically updates @v to @new with relaxed ordering.
4220 * Otherwise, @v is not modified and relaxed ordering is provided.
4224 * Return: The original value of @v.
4227 raw_atomic64_cmpxchg_relaxed(atomic64_t *v, s64 old, s64 new) in raw_atomic64_cmpxchg_relaxed() argument
4230 return arch_atomic64_cmpxchg_relaxed(v, old, new); in raw_atomic64_cmpxchg_relaxed()
4232 return arch_atomic64_cmpxchg(v, old, new); in raw_atomic64_cmpxchg_relaxed()
4234 return raw_cmpxchg_relaxed(&v->counter, old, new); in raw_atomic64_cmpxchg_relaxed()
4240 * @v: pointer to atomic64_t
4244 * If (@v == @old), atomically updates @v to @new with full ordering.
4245 * Otherwise, @v is not modified, @old is updated to the current value of @v,
4253 raw_atomic64_try_cmpxchg(atomic64_t *v, s64 *old, s64 new) in raw_atomic64_try_cmpxchg() argument
4256 return arch_atomic64_try_cmpxchg(v, old, new); in raw_atomic64_try_cmpxchg()
4260 ret = arch_atomic64_try_cmpxchg_relaxed(v, old, new); in raw_atomic64_try_cmpxchg()
4265 r = raw_atomic64_cmpxchg(v, o, new); in raw_atomic64_try_cmpxchg()
4274 * @v: pointer to atomic64_t
4278 * If (@v == @old), atomically updates @v to @new with acquire ordering.
4279 * Otherwise, @v is not modified, @old is updated to the current value of @v,
4287 raw_atomic64_try_cmpxchg_acquire(atomic64_t *v, s64 *old, s64 new) in raw_atomic64_try_cmpxchg_acquire() argument
4290 return arch_atomic64_try_cmpxchg_acquire(v, old, new); in raw_atomic64_try_cmpxchg_acquire()
4292 bool ret = arch_atomic64_try_cmpxchg_relaxed(v, old, new); in raw_atomic64_try_cmpxchg_acquire()
4296 return arch_atomic64_try_cmpxchg(v, old, new); in raw_atomic64_try_cmpxchg_acquire()
4299 r = raw_atomic64_cmpxchg_acquire(v, o, new); in raw_atomic64_try_cmpxchg_acquire()
4308 * @v: pointer to atomic64_t
4312 * If (@v == @old), atomically updates @v to @new with release ordering.
4313 * Otherwise, @v is not modified, @old is updated to the current value of @v,
4321 raw_atomic64_try_cmpxchg_release(atomic64_t *v, s64 *old, s64 new) in raw_atomic64_try_cmpxchg_release() argument
4324 return arch_atomic64_try_cmpxchg_release(v, old, new); in raw_atomic64_try_cmpxchg_release()
4327 return arch_atomic64_try_cmpxchg_relaxed(v, old, new); in raw_atomic64_try_cmpxchg_release()
4329 return arch_atomic64_try_cmpxchg(v, old, new); in raw_atomic64_try_cmpxchg_release()
4332 r = raw_atomic64_cmpxchg_release(v, o, new); in raw_atomic64_try_cmpxchg_release()
4341 * @v: pointer to atomic64_t
4345 * If (@v == @old), atomically updates @v to @new with relaxed ordering.
4346 * Otherwise, @v is not modified, @old is updated to the current value of @v,
4354 raw_atomic64_try_cmpxchg_relaxed(atomic64_t *v, s64 *old, s64 new) in raw_atomic64_try_cmpxchg_relaxed() argument
4357 return arch_atomic64_try_cmpxchg_relaxed(v, old, new); in raw_atomic64_try_cmpxchg_relaxed()
4359 return arch_atomic64_try_cmpxchg(v, old, new); in raw_atomic64_try_cmpxchg_relaxed()
4362 r = raw_atomic64_cmpxchg_relaxed(v, o, new); in raw_atomic64_try_cmpxchg_relaxed()
4372 * @v: pointer to atomic64_t
4374 * Atomically updates @v to (@v - @i) with full ordering.
4378 * Return: @true if the resulting value of @v is zero, @false otherwise.
4381 raw_atomic64_sub_and_test(s64 i, atomic64_t *v) in raw_atomic64_sub_and_test() argument
4384 return arch_atomic64_sub_and_test(i, v); in raw_atomic64_sub_and_test()
4386 return raw_atomic64_sub_return(i, v) == 0; in raw_atomic64_sub_and_test()
4392 * @v: pointer to atomic64_t
4394 * Atomically updates @v to (@v - 1) with full ordering.
4398 * Return: @true if the resulting value of @v is zero, @false otherwise.
4401 raw_atomic64_dec_and_test(atomic64_t *v) in raw_atomic64_dec_and_test() argument
4404 return arch_atomic64_dec_and_test(v); in raw_atomic64_dec_and_test()
4406 return raw_atomic64_dec_return(v) == 0; in raw_atomic64_dec_and_test()
4412 * @v: pointer to atomic64_t
4414 * Atomically updates @v to (@v + 1) with full ordering.
4418 * Return: @true if the resulting value of @v is zero, @false otherwise.
4421 raw_atomic64_inc_and_test(atomic64_t *v) in raw_atomic64_inc_and_test() argument
4424 return arch_atomic64_inc_and_test(v); in raw_atomic64_inc_and_test()
4426 return raw_atomic64_inc_return(v) == 0; in raw_atomic64_inc_and_test()
4433 * @v: pointer to atomic64_t
4435 * Atomically updates @v to (@v + @i) with full ordering.
4439 * Return: @true if the resulting value of @v is negative, @false otherwise.
4442 raw_atomic64_add_negative(s64 i, atomic64_t *v) in raw_atomic64_add_negative() argument
4445 return arch_atomic64_add_negative(i, v); in raw_atomic64_add_negative()
4449 ret = arch_atomic64_add_negative_relaxed(i, v); in raw_atomic64_add_negative()
4453 return raw_atomic64_add_return(i, v) < 0; in raw_atomic64_add_negative()
4460 * @v: pointer to atomic64_t
4462 * Atomically updates @v to (@v + @i) with acquire ordering.
4466 * Return: @true if the resulting value of @v is negative, @false otherwise.
4469 raw_atomic64_add_negative_acquire(s64 i, atomic64_t *v) in raw_atomic64_add_negative_acquire() argument
4472 return arch_atomic64_add_negative_acquire(i, v); in raw_atomic64_add_negative_acquire()
4474 bool ret = arch_atomic64_add_negative_relaxed(i, v); in raw_atomic64_add_negative_acquire()
4478 return arch_atomic64_add_negative(i, v); in raw_atomic64_add_negative_acquire()
4480 return raw_atomic64_add_return_acquire(i, v) < 0; in raw_atomic64_add_negative_acquire()
4487 * @v: pointer to atomic64_t
4489 * Atomically updates @v to (@v + @i) with release ordering.
4493 * Return: @true if the resulting value of @v is negative, @false otherwise.
4496 raw_atomic64_add_negative_release(s64 i, atomic64_t *v) in raw_atomic64_add_negative_release() argument
4499 return arch_atomic64_add_negative_release(i, v); in raw_atomic64_add_negative_release()
4502 return arch_atomic64_add_negative_relaxed(i, v); in raw_atomic64_add_negative_release()
4504 return arch_atomic64_add_negative(i, v); in raw_atomic64_add_negative_release()
4506 return raw_atomic64_add_return_release(i, v) < 0; in raw_atomic64_add_negative_release()
4513 * @v: pointer to atomic64_t
4515 * Atomically updates @v to (@v + @i) with relaxed ordering.
4519 * Return: @true if the resulting value of @v is negative, @false otherwise.
4522 raw_atomic64_add_negative_relaxed(s64 i, atomic64_t *v) in raw_atomic64_add_negative_relaxed() argument
4525 return arch_atomic64_add_negative_relaxed(i, v); in raw_atomic64_add_negative_relaxed()
4527 return arch_atomic64_add_negative(i, v); in raw_atomic64_add_negative_relaxed()
4529 return raw_atomic64_add_return_relaxed(i, v) < 0; in raw_atomic64_add_negative_relaxed()
4535 * @v: pointer to atomic64_t
4539 * If (@v != @u), atomically updates @v to (@v + @a) with full ordering.
4540 * Otherwise, @v is not modified and relaxed ordering is provided.
4544 * Return: The original value of @v.
4547 raw_atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u) in raw_atomic64_fetch_add_unless() argument
4550 return arch_atomic64_fetch_add_unless(v, a, u); in raw_atomic64_fetch_add_unless()
4552 s64 c = raw_atomic64_read(v); in raw_atomic64_fetch_add_unless()
4557 } while (!raw_atomic64_try_cmpxchg(v, &c, c + a)); in raw_atomic64_fetch_add_unless()
4565 * @v: pointer to atomic64_t
4569 * If (@v != @u), atomically updates @v to (@v + @a) with full ordering.
4570 * Otherwise, @v is not modified and relaxed ordering is provided.
4574 * Return: @true if @v was updated, @false otherwise.
4577 raw_atomic64_add_unless(atomic64_t *v, s64 a, s64 u) in raw_atomic64_add_unless() argument
4580 return arch_atomic64_add_unless(v, a, u); in raw_atomic64_add_unless()
4582 return raw_atomic64_fetch_add_unless(v, a, u) != u; in raw_atomic64_add_unless()
4588 * @v: pointer to atomic64_t
4590 * If (@v != 0), atomically updates @v to (@v + 1) with full ordering.
4591 * Otherwise, @v is not modified and relaxed ordering is provided.
4595 * Return: @true if @v was updated, @false otherwise.
4598 raw_atomic64_inc_not_zero(atomic64_t *v) in raw_atomic64_inc_not_zero() argument
4601 return arch_atomic64_inc_not_zero(v); in raw_atomic64_inc_not_zero()
4603 return raw_atomic64_add_unless(v, 1, 0); in raw_atomic64_inc_not_zero()
4609 * @v: pointer to atomic64_t
4611 * If (@v >= 0), atomically updates @v to (@v + 1) with full ordering.
4612 * Otherwise, @v is not modified and relaxed ordering is provided.
4616 * Return: @true if @v was updated, @false otherwise.
4619 raw_atomic64_inc_unless_negative(atomic64_t *v) in raw_atomic64_inc_unless_negative() argument
4622 return arch_atomic64_inc_unless_negative(v); in raw_atomic64_inc_unless_negative()
4624 s64 c = raw_atomic64_read(v); in raw_atomic64_inc_unless_negative()
4629 } while (!raw_atomic64_try_cmpxchg(v, &c, c + 1)); in raw_atomic64_inc_unless_negative()
4637 * @v: pointer to atomic64_t
4639 * If (@v <= 0), atomically updates @v to (@v - 1) with full ordering.
4640 * Otherwise, @v is not modified and relaxed ordering is provided.
4644 * Return: @true if @v was updated, @false otherwise.
4647 raw_atomic64_dec_unless_positive(atomic64_t *v) in raw_atomic64_dec_unless_positive() argument
4650 return arch_atomic64_dec_unless_positive(v); in raw_atomic64_dec_unless_positive()
4652 s64 c = raw_atomic64_read(v); in raw_atomic64_dec_unless_positive()
4657 } while (!raw_atomic64_try_cmpxchg(v, &c, c - 1)); in raw_atomic64_dec_unless_positive()
4665 * @v: pointer to atomic64_t
4667 * If (@v > 0), atomically updates @v to (@v - 1) with full ordering.
4668 * Otherwise, @v is not modified and relaxed ordering is provided.
4672 * Return: The old value of (@v - 1), regardless of whether @v was updated.
4675 raw_atomic64_dec_if_positive(atomic64_t *v) in raw_atomic64_dec_if_positive() argument
4678 return arch_atomic64_dec_if_positive(v); in raw_atomic64_dec_if_positive()
4680 s64 dec, c = raw_atomic64_read(v); in raw_atomic64_dec_if_positive()
4686 } while (!raw_atomic64_try_cmpxchg(v, &c, dec)); in raw_atomic64_dec_if_positive()