Messages in this thread | | | Date | Tue, 07 Dec 2010 15:17:28 +0100 | From | Tejun Heo <> | Subject | Re: [Use cpuops V1 04/11] x86: Use this_cpu_ops for current_cpu_data accesses |
| |
On 12/06/2010 06:16 PM, Christoph Lameter wrote: > Current_cpu_data accesses are per cpu accesses. We can also use > this_cpu_ops if a scalar is retrieved. > > Cc: Yinghai Lu <yinghai@kernel.org> > Cc: Ingo Molnar <mingo@elte.hu> > Signed-off-by: Christoph Lameter <cl@linux.com> > > --- > arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 2 +- > arch/x86/kernel/cpu/intel_cacheinfo.c | 4 ++-- > arch/x86/kernel/smpboot.c | 10 +++++----- > 3 files changed, 8 insertions(+), 8 deletions(-) > > Index: linux-2.6/arch/x86/kernel/smpboot.c > =================================================================== > --- linux-2.6.orig/arch/x86/kernel/smpboot.c 2010-11-30 11:53:03.000000000 -0600 > +++ linux-2.6/arch/x86/kernel/smpboot.c 2010-11-30 11:57:02.000000000 -0600 > @@ -430,7 +430,7 @@ void __cpuinit set_cpu_sibling_map(int c > > cpumask_set_cpu(cpu, c->llc_shared_map); > > - if (current_cpu_data.x86_max_cores == 1) { > + if (__this_cpu_read(cpu_info.x86_max_cores) == 1) { > cpumask_copy(cpu_core_mask(cpu), cpu_sibling_mask(cpu)); > c->booted_cores = 1; > return; > @@ -1377,7 +1377,7 @@ void play_dead_common(void) > > mb(); > /* Ack it */ > - __get_cpu_var(cpu_state) = CPU_DEAD; > + __this_cpu_write(cpu_state, CPU_DEAD);
This belongs to the previous patch, right? I'll move it over and apply 03 and 04. I think routing these through percpu is okay but if anyone wants these to go through x86, scream.
Thanks.
-- tejun
| |