* percpu: Replace __get_cpu_var with this_cpu_ptr
@ 2014-04-15 17:39 Christoph Lameter
2014-04-15 18:24 ` [PATCH] " Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Lameter @ 2014-04-15 17:39 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-kernel
One case of using __get_cpu_var in the get_cpu_var macro
for address calculation.
Signed-off-by: Christoph Lameter <cl@linux.com>
Index: linux/include/linux/percpu.h
===================================================================
--- linux.orig/include/linux/percpu.h 2014-04-14 13:24:54.669364001 -0500
+++ linux/include/linux/percpu.h 2014-04-14 13:24:54.661364156 -0500
@@ -29,7 +29,7 @@
*/
#define get_cpu_var(var) (*({ \
preempt_disable(); \
- &__get_cpu_var(var); }))
+ this_cpu_ptr(&var); }))
/*
* The weird & is necessary because sparse considers (void)(var) to be
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] percpu: Replace __get_cpu_var with this_cpu_ptr
2014-04-15 17:39 percpu: Replace __get_cpu_var with this_cpu_ptr Christoph Lameter
@ 2014-04-15 18:24 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2014-04-15 18:24 UTC (permalink / raw)
To: Christoph Lameter; +Cc: linux-kernel
Applied to percpu/for-3.16 with patch description updated.
Thanks.
--------- 8< ---------
>From fdb9c293decf7e06795f7d9ae409df907c7ae1b6 Mon Sep 17 00:00:00 2001
From: Christoph Lameter <cl@linux.com>
Date: Tue, 15 Apr 2014 12:39:14 -0500
__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>
---
include/linux/percpu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index e7a0b95..539b3ca 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -29,7 +29,7 @@
*/
#define get_cpu_var(var) (*({ \
preempt_disable(); \
- &__get_cpu_var(var); }))
+ this_cpu_ptr(&var); }))
/*
* The weird & is necessary because sparse considers (void)(var) to be
--
1.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-15 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15 17:39 percpu: Replace __get_cpu_var with this_cpu_ptr Christoph Lameter
2014-04-15 18:24 ` [PATCH] " Tejun Heo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.