percpu: Replace __get_cpu_var with this_cpu_ptr

__this_cpu_ptr is being phased out.  Use raw_cpu_ptr instead which was
introduced in 3.15-rc1.  One case of using __get_cpu_var in the
get_cpu_var macro for address calculation was remaining in
include/linux/percpu.h.

tj: Updated patch description.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
percpu-refcount: rename percpu_ref_tryget() to percpu_ref_tryget_live()

percpu_ref_tryget() is different from the usual tryget semantics in
that it fails if the refcnt is in its dying stage even if the refcnt
hasn't reached zero yet.  We're about to introduce the more
conventional tryget and the current one has only one user.  Let's
rename it to percpu_ref_tryget_live() so that it explicitly signifies
the peculiarities of its semantics.

This is pure rename.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Kent Overstreet <kmo@daterainc.com>
percpu-refcount: implement percpu_ref_tryget()

Implement percpu_ref_tryget() which fails if the refcnt already
reached zero.  Note that this is different from the recently renamed
percpu_ref_tryget_live() which fails if the refcnt has been killed and
is draining the remaining references.  percpu_ref_tryget() succeeds on
a killed refcnt as long as its current refcnt is above zero.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Kent Overstreet <kmo@daterainc.com>
Merge branch 'for-3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu.git into for-3.16

Pull percpu/for-3.15-fixes into percpu/for-3.16 to receive
0c36b390a546 ("percpu-refcount: fix usage of this_cpu_ops").

The merge doesn't produce any conflict but the automatic merge is
still incorrect because 4fb6e25049cb ("percpu-refcount: implement
percpu_ref_tryget()") added another use of __this_cpu_inc() which
should also be converted to this_cpu_ince().

This commit pulls in percpu/for-3.15-fixes and converts the newly
added __this_cpu_inc() to this_cpu_inc().

Signed-off-by: Tejun Heo <tj@kernel.org>
Merge branch 'for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu

Pull percpu updates from Tejun Heo:
 "Nothing too exciting.  percpu_ref is going through some interface
  changes and getting new features with more changes in the pipeline but
  given its young age and few users, it's very low impact"

* 'for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu-refcount: implement percpu_ref_tryget()
  percpu-refcount: rename percpu_ref_tryget() to percpu_ref_tryget_live()
  percpu: Replace __get_cpu_var with this_cpu_ptr