diff options
Diffstat (limited to 'include/linux/percpu.h')
| -rw-r--r-- | include/linux/percpu.h | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index cc88172c7d9a..9e4761caa80c 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -332,7 +332,7 @@ do { \ | |||
| 332 | #endif | 332 | #endif |
| 333 | 333 | ||
| 334 | #ifndef this_cpu_sub | 334 | #ifndef this_cpu_sub |
| 335 | # define this_cpu_sub(pcp, val) this_cpu_add((pcp), -(val)) | 335 | # define this_cpu_sub(pcp, val) this_cpu_add((pcp), -(typeof(pcp))(val)) |
| 336 | #endif | 336 | #endif |
| 337 | 337 | ||
| 338 | #ifndef this_cpu_inc | 338 | #ifndef this_cpu_inc |
| @@ -375,22 +375,6 @@ do { \ | |||
| 375 | # define this_cpu_or(pcp, val) __pcpu_size_call(this_cpu_or_, (pcp), (val)) | 375 | # define this_cpu_or(pcp, val) __pcpu_size_call(this_cpu_or_, (pcp), (val)) |
| 376 | #endif | 376 | #endif |
| 377 | 377 | ||
| 378 | #ifndef this_cpu_xor | ||
| 379 | # ifndef this_cpu_xor_1 | ||
| 380 | # define this_cpu_xor_1(pcp, val) _this_cpu_generic_to_op((pcp), (val), ^=) | ||
| 381 | # endif | ||
| 382 | # ifndef this_cpu_xor_2 | ||
| 383 | # define this_cpu_xor_2(pcp, val) _this_cpu_generic_to_op((pcp), (val), ^=) | ||
| 384 | # endif | ||
| 385 | # ifndef this_cpu_xor_4 | ||
| 386 | # define this_cpu_xor_4(pcp, val) _this_cpu_generic_to_op((pcp), (val), ^=) | ||
| 387 | # endif | ||
| 388 | # ifndef this_cpu_xor_8 | ||
| 389 | # define this_cpu_xor_8(pcp, val) _this_cpu_generic_to_op((pcp), (val), ^=) | ||
| 390 | # endif | ||
| 391 | # define this_cpu_xor(pcp, val) __pcpu_size_call(this_cpu_or_, (pcp), (val)) | ||
| 392 | #endif | ||
| 393 | |||
| 394 | #define _this_cpu_generic_add_return(pcp, val) \ | 378 | #define _this_cpu_generic_add_return(pcp, val) \ |
| 395 | ({ \ | 379 | ({ \ |
| 396 | typeof(pcp) ret__; \ | 380 | typeof(pcp) ret__; \ |
| @@ -418,7 +402,7 @@ do { \ | |||
| 418 | # define this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) | 402 | # define this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) |
| 419 | #endif | 403 | #endif |
| 420 | 404 | ||
| 421 | #define this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) | 405 | #define this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(typeof(pcp))(val)) |
| 422 | #define this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) | 406 | #define this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) |
| 423 | #define this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) | 407 | #define this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) |
| 424 | 408 | ||
| @@ -586,7 +570,7 @@ do { \ | |||
| 586 | #endif | 570 | #endif |
| 587 | 571 | ||
| 588 | #ifndef __this_cpu_sub | 572 | #ifndef __this_cpu_sub |
| 589 | # define __this_cpu_sub(pcp, val) __this_cpu_add((pcp), -(val)) | 573 | # define __this_cpu_sub(pcp, val) __this_cpu_add((pcp), -(typeof(pcp))(val)) |
| 590 | #endif | 574 | #endif |
| 591 | 575 | ||
| 592 | #ifndef __this_cpu_inc | 576 | #ifndef __this_cpu_inc |
| @@ -629,22 +613,6 @@ do { \ | |||
| 629 | # define __this_cpu_or(pcp, val) __pcpu_size_call(__this_cpu_or_, (pcp), (val)) | 613 | # define __this_cpu_or(pcp, val) __pcpu_size_call(__this_cpu_or_, (pcp), (val)) |
| 630 | #endif | 614 | #endif |
| 631 | 615 | ||
| 632 | #ifndef __this_cpu_xor | ||
| 633 | # ifndef __this_cpu_xor_1 | ||
| 634 | # define __this_cpu_xor_1(pcp, val) __this_cpu_generic_to_op((pcp), (val), ^=) | ||
| 635 | # endif | ||
| 636 | # ifndef __this_cpu_xor_2 | ||
| 637 | # define __this_cpu_xor_2(pcp, val) __this_cpu_generic_to_op((pcp), (val), ^=) | ||
| 638 | # endif | ||
| 639 | # ifndef __this_cpu_xor_4 | ||
| 640 | # define __this_cpu_xor_4(pcp, val) __this_cpu_generic_to_op((pcp), (val), ^=) | ||
| 641 | # endif | ||
| 642 | # ifndef __this_cpu_xor_8 | ||
| 643 | # define __this_cpu_xor_8(pcp, val) __this_cpu_generic_to_op((pcp), (val), ^=) | ||
| 644 | # endif | ||
| 645 | # define __this_cpu_xor(pcp, val) __pcpu_size_call(__this_cpu_xor_, (pcp), (val)) | ||
| 646 | #endif | ||
| 647 | |||
| 648 | #define __this_cpu_generic_add_return(pcp, val) \ | 616 | #define __this_cpu_generic_add_return(pcp, val) \ |
| 649 | ({ \ | 617 | ({ \ |
| 650 | __this_cpu_add(pcp, val); \ | 618 | __this_cpu_add(pcp, val); \ |
| @@ -668,7 +636,7 @@ do { \ | |||
| 668 | __pcpu_size_call_return2(__this_cpu_add_return_, pcp, val) | 636 | __pcpu_size_call_return2(__this_cpu_add_return_, pcp, val) |
| 669 | #endif | 637 | #endif |
| 670 | 638 | ||
| 671 | #define __this_cpu_sub_return(pcp, val) __this_cpu_add_return(pcp, -(val)) | 639 | #define __this_cpu_sub_return(pcp, val) __this_cpu_add_return(pcp, -(typeof(pcp))(val)) |
| 672 | #define __this_cpu_inc_return(pcp) __this_cpu_add_return(pcp, 1) | 640 | #define __this_cpu_inc_return(pcp) __this_cpu_add_return(pcp, 1) |
| 673 | #define __this_cpu_dec_return(pcp) __this_cpu_add_return(pcp, -1) | 641 | #define __this_cpu_dec_return(pcp) __this_cpu_add_return(pcp, -1) |
| 674 | 642 | ||
