Skip to content

Commit

Permalink
percpu: fix generic definition of __this_cpu_add_and_return()
Browse files Browse the repository at this point in the history
This patch adds missed "__" into function prefix.
Otherwise on all archectures (except x86) it expands to irq/preemtion-safe
variant: _this_cpu_generic_add_return(), which do extra irq-save/irq-restore.
Optimal generic implementation is __this_cpu_generic_add_return().

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Konstantin Khlebnikov authored and Tejun Heo committed Feb 21, 2012
1 parent 26dd8e0 commit 7d96b3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,8 @@ do { \
# ifndef __this_cpu_add_return_8
# define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val)
# endif
# define __this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val)
# define __this_cpu_add_return(pcp, val) \
__pcpu_size_call_return2(__this_cpu_add_return_, pcp, val)
#endif

#define __this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val))
Expand Down

0 comments on commit 7d96b3e

Please sign in to comment.