x86: Use this_cpu_ops to optimize code
Go through x86 code and replace __get_cpu_var and get_cpu_var instances that refer to a scalar and are not used for address determinations. Cc: Yinghai Lu <yinghai@kernel.org> Cc: Ingo Molnar <mingo@elte.hu> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@@ -659,7 +659,7 @@ void restore_sched_clock_state(void)
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
__get_cpu_var(cyc2ns_offset) = 0;
|
||||
__this_cpu_write(cyc2ns_offset, 0);
|
||||
offset = cyc2ns_suspend - sched_clock();
|
||||
|
||||
for_each_possible_cpu(cpu)
|
||||
|
Reference in New Issue
Block a user