Merge commit 'v2.6.34-rc6' into x86/cpu
authorH. Peter Anvin <hpa@zytor.com>
Sat, 8 May 2010 21:59:58 +0000 (14:59 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 8 May 2010 21:59:58 +0000 (14:59 -0700)
1  2 
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/cpu/vmware.c
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq_conservative.c

Simple merge
index 46a5b5d3ba5ec30bf943e5e84099b7337b66fd02,dfdb4dba23201e2507949d7b7a9ffeabc53e7961..265b432f6e644ca4e002b21d450f63af6c1a747d
   */
  
  #include <linux/dmi.h>
+ #include <linux/module.h>
  #include <asm/div64.h>
 -#include <asm/vmware.h>
  #include <asm/x86_init.h>
 +#include <asm/hypervisor.h>
  
  #define CPUID_VMWARE_INFO_LEAF        0x40000000
  #define VMWARE_HYPERVISOR_MAGIC       0x564D5868
@@@ -82,22 -83,26 +83,23 @@@ static void __init vmware_platform_setu
   * serial key should be enough, as this will always have a VMware
   * specific string when running under VMware hypervisor.
   */
 -int vmware_platform(void)
 +static bool __init vmware_platform(void)
  {
        if (cpu_has_hypervisor) {
 -              unsigned int eax, ebx, ecx, edx;
 -              char hyper_vendor_id[13];
 -
 -              cpuid(CPUID_VMWARE_INFO_LEAF, &eax, &ebx, &ecx, &edx);
 -              memcpy(hyper_vendor_id + 0, &ebx, 4);
 -              memcpy(hyper_vendor_id + 4, &ecx, 4);
 -              memcpy(hyper_vendor_id + 8, &edx, 4);
 -              hyper_vendor_id[12] = '\0';
 -              if (!strcmp(hyper_vendor_id, "VMwareVMware"))
 -                      return 1;
 +              unsigned int eax;
 +              unsigned int hyper_vendor_id[3];
 +
 +              cpuid(CPUID_VMWARE_INFO_LEAF, &eax, &hyper_vendor_id[0],
 +                    &hyper_vendor_id[1], &hyper_vendor_id[2]);
 +              if (!memcmp(hyper_vendor_id, "VMwareVMware", 12))
 +                      return true;
        } else if (dmi_available && dmi_name_in_serial("VMware") &&
                   __vmware_platform())
 -              return 1;
 +              return true;
  
 -      return 0;
 +      return false;
  }
+ EXPORT_SYMBOL(vmware_platform);
  
  /*
   * VMware hypervisor takes care of exporting a reliable TSC to the guest.
Simple merge