[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 08/11] x86/intel_pstate: add a booting param to select the driver to load
By default, the old P-state driver (acpi-freq) is used. Adding "intel_pstate" to the Xen booting param list to enable the use of intel_pstate. However, if intel_pstate is enabled on a machine which does not support the driver (e.g. Nehalem), the old P-state driver will be loaded due to the failure loading of intel_pstate. Signed-off-by: Wei Wang <wei.w.wang@xxxxxxxxx> --- xen/arch/x86/acpi/cpufreq/cpufreq.c | 8 +++++--- xen/arch/x86/acpi/cpufreq/intel_pstate.c | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c index fa3678d..3765fc4 100644 --- a/xen/arch/x86/acpi/cpufreq/cpufreq.c +++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c @@ -650,9 +650,11 @@ static int __init cpufreq_driver_init(void) int ret = 0; if ((cpufreq_controller == FREQCTL_xen) && - (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) - ret = cpufreq_register_driver(&acpi_cpufreq_driver); - else if ((cpufreq_controller == FREQCTL_xen) && + (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) { + ret = intel_pstate_init(); + if (ret) + ret = cpufreq_register_driver(&acpi_cpufreq_driver); + } else if ((cpufreq_controller == FREQCTL_xen) && (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)) ret = powernow_register_driver(); diff --git a/xen/arch/x86/acpi/cpufreq/intel_pstate.c b/xen/arch/x86/acpi/cpufreq/intel_pstate.c index 48bbc30..d1a6056 100644 --- a/xen/arch/x86/acpi/cpufreq/intel_pstate.c +++ b/xen/arch/x86/acpi/cpufreq/intel_pstate.c @@ -749,6 +749,9 @@ static struct cpufreq_driver intel_pstate_driver = { .name = "intel_pstate", }; +static bool_t __initdata load_intel_pstate; +boolean_param("intel_pstate", load_intel_pstate); + static int intel_pstate_msrs_not_valid(void) { if (!pstate_funcs.get_max() || @@ -785,6 +788,9 @@ int __init intel_pstate_init(void) const struct x86_cpu_id *id; struct cpu_defaults *cpu_info; + if (!load_intel_pstate) + return -ENODEV; + id = x86_match_cpu(intel_pstate_cpu_ids); if (!id) return -ENODEV; -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |