x86: clean up and fix setup_clear/force_cpu_cap handling
authorYinghai Lu <yinghai@kernel.org>
Sun, 10 May 2009 06:47:42 +0000 (23:47 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 11 May 2009 08:57:24 +0000 (10:57 +0200)
commit3e0c373749d7eb5b354ac0b043f2b2cdf84eefef
tree473870b2f527ce227cb729db35dbe226ce95a7d1
parent3969c52d4d2fef5a4b9e3ab0e51b3901e1cc8b83
x86: clean up and fix setup_clear/force_cpu_cap handling

setup_force_cpu_cap() only have one user (Xen guest code),
but it should not reuse cleared_cpu_cpus, otherwise it
will have problems on SMP.

Need to have a separate cpu_cpus_set array too, for forced-on
flags, beyond the forced-off flags.

Also need to setup handling before all cpus caps are combined.

[ Impact: fix the forced-set CPU feature flag logic ]

Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Yinghai Lu <yinghai.lu@kernel.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/cpufeature.h
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c