diff options
author | Liu, Jinsong <jinsong.liu@intel.com> | 2011-05-31 13:53:54 +0100 |
---|---|---|
committer | Liu, Jinsong <jinsong.liu@intel.com> | 2011-05-31 13:53:54 +0100 |
commit | 7f55e2b770d9583e3572aefa656882d76f1de523 (patch) | |
tree | 9fca8a365d4f0612cf3a0a3fad4bb64e3ca98b97 /xen/arch/x86/acpi/cpufreq | |
parent | aef3e0b8f1c2a68676b72d3f68c2755e67dfc74d (diff) |
x86: cpufreq init cleanup
c/s 20325 change AMD cpufreq init logic. Before that, AMD cpu start
cpufreq init logic only when all cpus ready. c/s 20325 change it to
per cpu add, however, leave code un-elegant.
This patch do a little cleanup work.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Diffstat (limited to 'xen/arch/x86/acpi/cpufreq')
-rw-r--r-- | xen/arch/x86/acpi/cpufreq/cpufreq.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c index 26339a0867..3db676fc45 100644 --- a/xen/arch/x86/acpi/cpufreq/cpufreq.c +++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c @@ -695,15 +695,11 @@ __initcall(cpufreq_driver_init); int cpufreq_cpu_init(unsigned int cpuid) { - static int cpu_count=0; int ret; - cpu_count++; - /* Currently we only handle Intel and AMD processor */ - if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ) - ret = cpufreq_add_cpu(cpuid); - else if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD ) + if ( (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ) || + (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ) ) ret = cpufreq_add_cpu(cpuid); else ret = -EFAULT; |