[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Move cpufreq option parsing to cpufreq.c
# HG changeset patch # User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> # Date 1327311514 0 # Node ID 95e07258d189579592fabd1fb6633dfc4a6be9bb # Parent 5bb22a6871f6c2a0dcd8573135abdf8c91af6f17 Move cpufreq option parsing to cpufreq.c Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Committed-by: Keir Fraser <keir@xxxxxxx> --- diff -r 5bb22a6871f6 -r 95e07258d189 xen/common/domain.c --- a/xen/common/domain.c Mon Jan 23 09:36:54 2012 +0000 +++ b/xen/common/domain.c Mon Jan 23 09:38:34 2012 +0000 @@ -31,8 +31,8 @@ #include <xen/grant_table.h> #include <xen/xenoprof.h> #include <xen/irq.h> -#include <acpi/cpufreq/cpufreq.h> #include <asm/debugger.h> +#include <asm/processor.h> #include <public/sched.h> #include <public/sysctl.h> #include <public/vcpu.h> @@ -45,40 +45,9 @@ unsigned int xen_processor_pmbits = XEN_PROCESSOR_PM_PX; /* opt_dom0_vcpus_pin: If true, dom0 VCPUs are pinned. */ -static bool_t opt_dom0_vcpus_pin; +bool_t opt_dom0_vcpus_pin; boolean_param("dom0_vcpus_pin", opt_dom0_vcpus_pin); -/* set xen as default cpufreq */ -enum cpufreq_controller cpufreq_controller = FREQCTL_xen; - -static void __init setup_cpufreq_option(char *str) -{ - char *arg; - - if ( !strcmp(str, "dom0-kernel") ) - { - xen_processor_pmbits &= ~XEN_PROCESSOR_PM_PX; - cpufreq_controller = FREQCTL_dom0_kernel; - opt_dom0_vcpus_pin = 1; - return; - } - - if ( !strcmp(str, "none") ) - { - xen_processor_pmbits &= ~XEN_PROCESSOR_PM_PX; - cpufreq_controller = FREQCTL_none; - return; - } - - if ( (arg = strpbrk(str, ",:")) != NULL ) - *arg++ = '\0'; - - if ( !strcmp(str, "xen") ) - if ( arg && *arg ) - cpufreq_cmdline_parse(arg); -} -custom_param("cpufreq", setup_cpufreq_option); - /* Protect updates/reads (resp.) of domain_list and domain_hash. */ DEFINE_SPINLOCK(domlist_update_lock); DEFINE_RCU_READ_LOCK(domlist_read_lock); diff -r 5bb22a6871f6 -r 95e07258d189 xen/drivers/cpufreq/cpufreq.c --- a/xen/drivers/cpufreq/cpufreq.c Mon Jan 23 09:36:54 2012 +0000 +++ b/xen/drivers/cpufreq/cpufreq.c Mon Jan 23 09:38:34 2012 +0000 @@ -60,6 +60,37 @@ struct cpufreq_governor *__read_mostly cpufreq_opt_governor; LIST_HEAD_READ_MOSTLY(cpufreq_governor_list); +/* set xen as default cpufreq */ +enum cpufreq_controller cpufreq_controller = FREQCTL_xen; + +static void __init setup_cpufreq_option(char *str) +{ + char *arg; + + if ( !strcmp(str, "dom0-kernel") ) + { + xen_processor_pmbits &= ~XEN_PROCESSOR_PM_PX; + cpufreq_controller = FREQCTL_dom0_kernel; + opt_dom0_vcpus_pin = 1; + return; + } + + if ( !strcmp(str, "none") ) + { + xen_processor_pmbits &= ~XEN_PROCESSOR_PM_PX; + cpufreq_controller = FREQCTL_none; + return; + } + + if ( (arg = strpbrk(str, ",:")) != NULL ) + *arg++ = '\0'; + + if ( !strcmp(str, "xen") ) + if ( arg && *arg ) + cpufreq_cmdline_parse(arg); +} +custom_param("cpufreq", setup_cpufreq_option); + bool_t __read_mostly cpufreq_verbose; struct cpufreq_governor *__find_governor(const char *governor) diff -r 5bb22a6871f6 -r 95e07258d189 xen/include/xen/domain.h --- a/xen/include/xen/domain.h Mon Jan 23 09:36:54 2012 +0000 +++ b/xen/include/xen/domain.h Mon Jan 23 09:38:34 2012 +0000 @@ -83,4 +83,6 @@ extern unsigned int xen_processor_pmbits; +extern bool_t opt_dom0_vcpus_pin; + #endif /* __XEN_DOMAIN_H__ */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |