Commit f50c763a authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI] Handle _CST change notifications

It is necessary to unload the processor idle handle for
a short period of time to avoid for nasty races --
and we don't want to grab too many locks
so that the idle handler continues to be speedy.

http://bugzilla.kernel.org/show_bug.cgi?id=1958Signed-off-by: default avatarBruno Ducrot <ducrot@poupinou.org>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.de>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 9ec0be52
...@@ -627,7 +627,7 @@ acpi_processor_notify ( ...@@ -627,7 +627,7 @@ acpi_processor_notify (
pr->performance_platform_limit); pr->performance_platform_limit);
break; break;
case ACPI_PROCESSOR_NOTIFY_POWER: case ACPI_PROCESSOR_NOTIFY_POWER:
/* TBD */ acpi_processor_cst_has_changed(pr);
acpi_bus_generate_event(device, event, 0); acpi_bus_generate_event(device, event, 0);
break; break;
default: default:
......
...@@ -778,6 +778,32 @@ int acpi_processor_get_power_info ( ...@@ -778,6 +778,32 @@ int acpi_processor_get_power_info (
return_VALUE(0); return_VALUE(0);
} }
int acpi_processor_cst_has_changed (struct acpi_processor *pr)
{
int result = 0;
ACPI_FUNCTION_TRACE("acpi_processor_cst_has_changed");
if (!pr)
return_VALUE(-EINVAL);
if (errata.smp) {
return_VALUE(-ENODEV);
}
/* Fall back to the default idle loop */
pm_idle = pm_idle_save;
pm_idle_save = NULL;
pr->flags.power = 0;
result = acpi_processor_get_power_info(pr);
if (pr->flags.power == 1) {
pm_idle_save = pm_idle;
pm_idle = acpi_processor_idle;
}
return_VALUE(result);
}
/* proc interface */ /* proc interface */
...@@ -859,3 +885,4 @@ struct file_operations acpi_processor_power_fops = { ...@@ -859,3 +885,4 @@ struct file_operations acpi_processor_power_fops = {
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .release = single_release,
}; };
...@@ -215,6 +215,7 @@ void acpi_processor_idle (void); ...@@ -215,6 +215,7 @@ void acpi_processor_idle (void);
int acpi_processor_get_power_info (struct acpi_processor *pr); int acpi_processor_get_power_info (struct acpi_processor *pr);
extern struct file_operations acpi_processor_power_fops; extern struct file_operations acpi_processor_power_fops;
int no_c2c3(struct dmi_system_id *id); int no_c2c3(struct dmi_system_id *id);
int acpi_processor_cst_has_changed (struct acpi_processor *pr);
/* in processor_thermal.c */ /* in processor_thermal.c */
int acpi_processor_get_limit_info (struct acpi_processor *pr); int acpi_processor_get_limit_info (struct acpi_processor *pr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment