lkml.org 
[lkml]   [2014]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectpercpu: Replace __get_cpu_var with this_cpu_ptr
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

\
 
 \ /
  Last update: 2014-04-15 20:01    [W:0.024 / U:4.076 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site