|
@@ -423,36 +423,7 @@ upload:
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
-static int __init check_prereq(void)
|
|
|
|
-{
|
|
|
|
- struct cpuinfo_x86 *c = &cpu_data(0);
|
|
|
|
-
|
|
|
|
- if (!xen_initial_domain())
|
|
|
|
- return -ENODEV;
|
|
|
|
-
|
|
|
|
- if (!acpi_gbl_FADT.smi_command)
|
|
|
|
- return -ENODEV;
|
|
|
|
-
|
|
|
|
- if (c->x86_vendor == X86_VENDOR_INTEL) {
|
|
|
|
- if (!cpu_has(c, X86_FEATURE_EST))
|
|
|
|
- return -ENODEV;
|
|
|
|
|
|
|
|
- return 0;
|
|
|
|
- }
|
|
|
|
- if (c->x86_vendor == X86_VENDOR_AMD) {
|
|
|
|
- /* Copied from powernow-k8.h, can't include ../cpufreq/powernow
|
|
|
|
- * as we get compile warnings for the static functions.
|
|
|
|
- */
|
|
|
|
-#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007
|
|
|
|
-#define USE_HW_PSTATE 0x00000080
|
|
|
|
- u32 eax, ebx, ecx, edx;
|
|
|
|
- cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx);
|
|
|
|
- if ((edx & USE_HW_PSTATE) != USE_HW_PSTATE)
|
|
|
|
- return -ENODEV;
|
|
|
|
- return 0;
|
|
|
|
- }
|
|
|
|
- return -ENODEV;
|
|
|
|
-}
|
|
|
|
/* acpi_perf_data is a pointer to percpu data. */
|
|
/* acpi_perf_data is a pointer to percpu data. */
|
|
static struct acpi_processor_performance __percpu *acpi_perf_data;
|
|
static struct acpi_processor_performance __percpu *acpi_perf_data;
|
|
|
|
|
|
@@ -509,10 +480,10 @@ struct notifier_block xen_acpi_processor_resume_nb = {
|
|
static int __init xen_acpi_processor_init(void)
|
|
static int __init xen_acpi_processor_init(void)
|
|
{
|
|
{
|
|
unsigned int i;
|
|
unsigned int i;
|
|
- int rc = check_prereq();
|
|
|
|
|
|
+ int rc;
|
|
|
|
|
|
- if (rc)
|
|
|
|
- return rc;
|
|
|
|
|
|
+ if (!xen_initial_domain())
|
|
|
|
+ return -ENODEV;
|
|
|
|
|
|
nr_acpi_bits = get_max_acpi_id() + 1;
|
|
nr_acpi_bits = get_max_acpi_id() + 1;
|
|
acpi_ids_done = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned long), GFP_KERNEL);
|
|
acpi_ids_done = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned long), GFP_KERNEL);
|