summaryrefslogtreecommitdiff
path: root/xen/arch/x86/acpi/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2019-04-04 19:39:08 +0100
committerAndrew Cooper <andrew.cooper3@citrix.com>2019-04-05 11:09:08 +0100
commit0cd074144cbb32de53e98eaad7d0ecd9259f219b (patch)
tree178514b060a36cfa421dff2cbb144403b051f77c /xen/arch/x86/acpi/cpufreq/cpufreq.c
parentf2f8c67ed9e5ec2c61c8d70653cc35d5427efe82 (diff)
x86/cpu: Renumber X86_VENDOR_* to form a bitmap
CPUs from different vendors sometimes share characteristics. All users of X86_VENDOR_* are now direct equal/not-equal comparisons. By expressing the X86_VENDOR_* constants in a bitmap fashon, we can more concicely and efficiently test whether a vendor is one of a group. Update all parts of the code which can already benefit from this improvement. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/acpi/cpufreq/cpufreq.c')
-rw-r--r--xen/arch/x86/acpi/cpufreq/cpufreq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c
index 844ab85cd3..f4e13e10e8 100644
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -661,8 +661,7 @@ int cpufreq_cpu_init(unsigned int cpuid)
int ret;
/* Currently we only handle Intel and AMD processor */
- if ( (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL ) ||
- (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ) )
+ if ( boot_cpu_data.x86_vendor & (X86_VENDOR_INTEL | X86_VENDOR_AMD) )
ret = cpufreq_add_cpu(cpuid);
else
ret = -EFAULT;