[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] Decouple xen controlled cpufreq path from dom0 CONFIG_CPU_FREQ,
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1217334375 -3600 # Node ID b8916f4d48f6fac453c2e0af896b681d5288c524 # Parent 2f1355579c9cd91b237a0851efd3d7f379a6af4c Decouple xen controlled cpufreq path from dom0 CONFIG_CPU_FREQ, since only processor_perflib.o is required for necessary freq information parse. This avoids hacks to cpufreq drivers and fortunately the change is not intrusive. Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx> Signed-off-by Jinsong Liu <jinsong.liu@xxxxxxxx> --- arch/i386/kernel/acpi/Makefile | 2 ++ arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 11 ----------- arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 10 ---------- arch/x86_64/kernel/acpi/Makefile | 5 +++-- drivers/acpi/Makefile | 2 +- drivers/acpi/processor_core.c | 2 -- drivers/acpi/processor_extcntl.c | 4 ---- drivers/acpi/processor_perflib.c | 18 +++++++++++++----- drivers/cpufreq/Kconfig | 1 + include/acpi/processor.h | 4 ++++ 10 files changed, 24 insertions(+), 35 deletions(-) diff -r 2f1355579c9c -r b8916f4d48f6 arch/i386/kernel/acpi/Makefile --- a/arch/i386/kernel/acpi/Makefile Mon Jul 28 11:43:36 2008 +0100 +++ b/arch/i386/kernel/acpi/Makefile Tue Jul 29 13:26:15 2008 +0100 @@ -4,7 +4,9 @@ obj-$(CONFIG_ACPI_SLEEP) += sleep.o wake ifneq ($(CONFIG_ACPI_PROCESSOR),) obj-y += cstate.o processor.o +ifneq ($(CONFIG_PROCESSOR_EXTERNAL_CONTROL),) obj-$(CONFIG_XEN) += processor_extcntl_xen.o +endif endif disabled-obj-$(CONFIG_XEN) := cstate.o wakeup.o diff -r 2f1355579c9c -r b8916f4d48f6 arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c Mon Jul 28 11:43:36 2008 +0100 +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c Tue Jul 29 13:26:15 2008 +0100 @@ -568,17 +568,6 @@ acpi_cpufreq_init (void) { dprintk("acpi_cpufreq_init\n"); -#ifdef CONFIG_XEN - /* - * This effectively blocks in-kernel cpufreq driver to interfere - * external control logic - */ - if (processor_pmperf_external()) { - printk("CPUFREQ is controllerd externally...exit then!\n"); - return -1; - } -#endif /* CONFIG_XEN */ - acpi_cpufreq_early_init_acpi(); return cpufreq_register_driver(&acpi_cpufreq_driver); diff -r 2f1355579c9c -r b8916f4d48f6 arch/i386/kernel/cpu/cpufreq/powernow-k8.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c Mon Jul 28 11:43:36 2008 +0100 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c Tue Jul 29 13:26:15 2008 +0100 @@ -1312,16 +1312,6 @@ static int __cpuinit powernowk8_init(voi { unsigned int i, supported_cpus = 0; -#ifdef CONFIG_XEN - /* - * This effectively blocks in-kernel cpufreq driver to interfere - * external control logic - */ - if (processor_pmperf_external()) { - return -ENODEV; - } -#endif /* CONFIG_XEN */ - for_each_online_cpu(i) { if (check_supported_cpu(i)) supported_cpus++; diff -r 2f1355579c9c -r b8916f4d48f6 arch/x86_64/kernel/acpi/Makefile --- a/arch/x86_64/kernel/acpi/Makefile Mon Jul 28 11:43:36 2008 +0100 +++ b/arch/x86_64/kernel/acpi/Makefile Tue Jul 29 13:26:15 2008 +0100 @@ -6,8 +6,9 @@ obj-y += processor.o obj-y += processor.o processor-y := ../../../i386/kernel/acpi/processor.o ../../../i386/kernel/acpi/cstate.o processor-$(CONFIG_XEN) := ../../../i386/kernel/acpi/processor.o +ifneq ($(CONFIG_PROCESSOR_EXTERNAL_CONTROL),) +processor-$(CONFIG_XEN) += ../../../i386/kernel/acpi/processor_extcntl_xen.o +endif endif -obj-$(CONFIG_XEN) += processor_extcnt_xen.o -processor_extcnt_xen-$(CONFIG_XEN) := ../../../i386/kernel/acpi/processor_extcntl_xen.o disabled-obj-$(CONFIG_XEN) := wakeup.o diff -r 2f1355579c9c -r b8916f4d48f6 drivers/acpi/Makefile --- a/drivers/acpi/Makefile Mon Jul 28 11:43:36 2008 +0100 +++ b/drivers/acpi/Makefile Tue Jul 29 13:26:15 2008 +0100 @@ -35,7 +35,7 @@ processor-objs += processor_perflib.o processor-objs += processor_perflib.o endif ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL -processor-objs += processor_extcntl.o +processor-objs += processor_perflib.o processor_extcntl.o endif obj-y += sleep/ diff -r 2f1355579c9c -r b8916f4d48f6 drivers/acpi/processor_core.c --- a/drivers/acpi/processor_core.c Mon Jul 28 11:43:36 2008 +0100 +++ b/drivers/acpi/processor_core.c Tue Jul 29 13:26:15 2008 +0100 @@ -509,9 +509,7 @@ static int acpi_processor_get_info(struc request_region(pr->throttling.address, 6, "ACPI CPU throttle"); } -#ifdef CONFIG_CPU_FREQ acpi_processor_ppc_has_changed(pr); -#endif acpi_processor_get_throttling_info(pr); acpi_processor_get_limit_info(pr); diff -r 2f1355579c9c -r b8916f4d48f6 drivers/acpi/processor_extcntl.c --- a/drivers/acpi/processor_extcntl.c Mon Jul 28 11:43:36 2008 +0100 +++ b/drivers/acpi/processor_extcntl.c Tue Jul 29 13:26:15 2008 +0100 @@ -168,7 +168,6 @@ static int processor_extcntl_parse_csd(s * logic. So we have to collect raw performance information here * when ACPI processor object is found and started. */ -#ifdef CONFIG_CPU_FREQ static int processor_extcntl_get_performance(struct acpi_processor *pr) { int ret; @@ -225,6 +224,3 @@ err_out: kfree(perf); return ret; } -#else -static int processor_extcntl_get_performance(struct acpi_processor *pr) { return 0; } -#endif diff -r 2f1355579c9c -r b8916f4d48f6 drivers/acpi/processor_perflib.c --- a/drivers/acpi/processor_perflib.c Mon Jul 28 11:43:36 2008 +0100 +++ b/drivers/acpi/processor_perflib.c Tue Jul 29 13:26:15 2008 +0100 @@ -66,6 +66,7 @@ static DEFINE_MUTEX(performance_mutex); static int acpi_processor_ppc_status = 0; +#ifdef CONFIG_CPU_FREQ static int acpi_processor_ppc_notifier(struct notifier_block *nb, unsigned long event, void *data) { @@ -102,6 +103,7 @@ static struct notifier_block acpi_ppc_no static struct notifier_block acpi_ppc_notifier_block = { .notifier_call = acpi_processor_ppc_notifier, }; +#endif /* CONFIG_CPU_FREQ */ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) { @@ -136,13 +138,16 @@ int acpi_processor_ppc_has_changed(struc int ret = acpi_processor_get_platform_limit(pr); if (ret < 0) return (ret); - else if (processor_pmperf_external()) + else +#ifdef CONFIG_CPU_FREQ + return cpufreq_update_policy(pr->id); +#elif CONFIG_PROCESSOR_EXTERNAL_CONTROL return processor_notify_external(pr, PROCESSOR_PM_CHANGE, PM_TYPE_PERF); - else - return cpufreq_update_policy(pr->id); -} - +#endif +} + +#ifdef CONFIG_CPU_FREQ void acpi_processor_ppc_init(void) { if (!cpufreq_register_notifier @@ -161,6 +166,7 @@ void acpi_processor_ppc_exit(void) acpi_processor_ppc_status &= ~PPC_REGISTERED; } +#endif /* CONFIG_CPU_FREQ */ static int acpi_processor_get_performance_control(struct acpi_processor *pr) { @@ -337,6 +343,7 @@ int acpi_processor_get_performance_info( return 0; } +#ifdef CONFIG_CPU_FREQ int acpi_processor_notify_smm(struct module *calling_module) { acpi_status status; @@ -404,6 +411,7 @@ int acpi_processor_notify_smm(struct mod } EXPORT_SYMBOL(acpi_processor_notify_smm); +#endif /* CONFIG_CPU_FREQ */ #ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF /* /proc/acpi/processor/../performance interface (DEPRECATED) */ diff -r 2f1355579c9c -r b8916f4d48f6 drivers/cpufreq/Kconfig --- a/drivers/cpufreq/Kconfig Mon Jul 28 11:43:36 2008 +0100 +++ b/drivers/cpufreq/Kconfig Tue Jul 29 13:26:15 2008 +0100 @@ -1,5 +1,6 @@ config CPU_FREQ config CPU_FREQ bool "CPU Frequency scaling" + depends on !PROCESSOR_EXTERNAL_CONTROL help CPU Frequency scaling allows you to change the clock speed of CPUs on the fly. This is a nice method to save power, because diff -r 2f1355579c9c -r b8916f4d48f6 include/acpi/processor.h --- a/include/acpi/processor.h Mon Jul 28 11:43:36 2008 +0100 +++ b/include/acpi/processor.h Tue Jul 29 13:26:15 2008 +0100 @@ -254,6 +254,9 @@ static inline void acpi_processor_ppc_ex { return; } +#ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL +int acpi_processor_ppc_has_changed(struct acpi_processor *pr); +#else static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) { static unsigned int printout = 1; @@ -266,6 +269,7 @@ static inline int acpi_processor_ppc_has } return 0; } +#endif /* CONFIG_PROCESSOR_EXTERNAL_CONTROL */ #endif /* CONFIG_CPU_FREQ */ /* in processor_throttling.c */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |