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:
parent
390dfd95c5
commit
dd17c8f729
24 changed files with 80 additions and 90 deletions
|
|
@ -76,22 +76,22 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
|
|||
|
||||
static inline void __count_vm_event(enum vm_event_item item)
|
||||
{
|
||||
__this_cpu_inc(per_cpu_var(vm_event_states).event[item]);
|
||||
__this_cpu_inc(vm_event_states.event[item]);
|
||||
}
|
||||
|
||||
static inline void count_vm_event(enum vm_event_item item)
|
||||
{
|
||||
this_cpu_inc(per_cpu_var(vm_event_states).event[item]);
|
||||
this_cpu_inc(vm_event_states.event[item]);
|
||||
}
|
||||
|
||||
static inline void __count_vm_events(enum vm_event_item item, long delta)
|
||||
{
|
||||
__this_cpu_add(per_cpu_var(vm_event_states).event[item], delta);
|
||||
__this_cpu_add(vm_event_states.event[item], delta);
|
||||
}
|
||||
|
||||
static inline void count_vm_events(enum vm_event_item item, long delta)
|
||||
{
|
||||
this_cpu_add(per_cpu_var(vm_event_states).event[item], delta);
|
||||
this_cpu_add(vm_event_states.event[item], delta);
|
||||
}
|
||||
|
||||
extern void all_vm_events(unsigned long *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue