int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
{
	int ret;

#ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL
	/* Xen hypervisor can handle cpufreq _PPC event */
	if (ignore_ppc < 0 && processor_pmperf_external())
		ignore_ppc = 0;
#endif

	if (ignore_ppc)
		return 0;

	ret = acpi_processor_get_platform_limit(pr);

	if (ret < 0)
		return (ret);
	else
#ifdef CONFIG_CPU_FREQ
		return cpufreq_update_policy(pr->id);
#elif defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
		return processor_notify_external(pr,
				PROCESSOR_PM_CHANGE, PM_TYPE_PERF);
#endif
}
Example #2
0
/*
 * This is called from ACPI processor init, and targeted to hold
 * some tricky housekeeping jobs to satisfy external control model.
 * For example, we may put dependency parse stub here for idle
 * and performance state. Those information may be not available
 * if splitting from dom0 control logic like cpufreq driver.
 */
int processor_extcntl_prepare(struct acpi_processor *pr)
{
	/* parse cstate dependency information */
	if (processor_pm_external())
		processor_extcntl_parse_csd(pr);

	/* Initialize performance states */
	if (processor_pmperf_external())
		processor_extcntl_get_performance(pr);

	return 0;
}