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
{
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);
{
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++;
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
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/
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);
* 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;
kfree(perf);
return ret;
}
-#else
-static int processor_extcntl_get_performance(struct acpi_processor *pr) { return 0; }
-#endif
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)
{
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)
{
int ret = acpi_processor_get_platform_limit(pr);
if (ret < 0)
return (ret);
- else if (processor_pmperf_external())
- return processor_notify_external(pr,
- PROCESSOR_PM_CHANGE, PM_TYPE_PERF);
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);
+#endif
}
+#ifdef CONFIG_CPU_FREQ
void acpi_processor_ppc_init(void)
{
if (!cpufreq_register_notifier
acpi_processor_ppc_status &= ~PPC_REGISTERED;
}
+#endif /* CONFIG_CPU_FREQ */
static int acpi_processor_get_performance_control(struct acpi_processor *pr)
{
return 0;
}
+#ifdef CONFIG_CPU_FREQ
int acpi_processor_notify_smm(struct module *calling_module)
{
acpi_status status;
}
EXPORT_SYMBOL(acpi_processor_notify_smm);
+#endif /* CONFIG_CPU_FREQ */
#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
/* /proc/acpi/processor/../performance interface (DEPRECATED) */
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
{
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;
}
return 0;
}
+#endif /* CONFIG_PROCESSOR_EXTERNAL_CONTROL */
#endif /* CONFIG_CPU_FREQ */
/* in processor_throttling.c */