percpu: remove per_cpu__ prefix.
Now that the return from alloc_percpu is compatible with the address of per-cpu vars, it makes sense to hand around the address of per-cpu variables. To make this sane, we remove the per_cpu__ prefix we used created to stop people accidentally using these vars directly. Now we have sparse, we can use that (next patch). tj: * Updated to convert stuff which were missed by or added after the original patch. * Kill per_cpu_var() macro. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
This commit is contained in:
@@ -182,7 +182,7 @@ static inline void *pcpu_lpage_remapped(void *kaddr)
|
||||
#ifndef percpu_read
|
||||
# define percpu_read(var) \
|
||||
({ \
|
||||
typeof(per_cpu_var(var)) __tmp_var__; \
|
||||
typeof(var) __tmp_var__; \
|
||||
__tmp_var__ = get_cpu_var(var); \
|
||||
put_cpu_var(var); \
|
||||
__tmp_var__; \
|
||||
@@ -253,8 +253,7 @@ do { \
|
||||
|
||||
/*
|
||||
* Optimized manipulation for memory allocated through the per cpu
|
||||
* allocator or for addresses of per cpu variables (can be determined
|
||||
* using per_cpu_var(xx).
|
||||
* allocator or for addresses of per cpu variables.
|
||||
*
|
||||
* These operation guarantee exclusivity of access for other operations
|
||||
* on the *same* processor. The assumption is that per cpu data is only
|
||||
|
Reference in New Issue
Block a user