Commit 729c6ba3 authored by Venkatesh Pallipadi's avatar Venkatesh Pallipadi Committed by Thomas Gleixner

ACPI: Reevaluate C/P/T states when a cpu becomes online

Reevaluate C/P/T states when a cpu becomes online. This avoids
the caching of the broadcast information in the clockevents layer.
Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Len Brown <len.brown@intel.com>
parent 6a669ee8
...@@ -724,6 +724,25 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) ...@@ -724,6 +724,25 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
return; return;
} }
static int acpi_cpu_soft_notify(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
struct acpi_processor *pr = processors[cpu];
if (action == CPU_ONLINE && pr) {
acpi_processor_ppc_has_changed(pr);
acpi_processor_cst_has_changed(pr);
acpi_processor_tstate_has_changed(pr);
}
return NOTIFY_OK;
}
static struct notifier_block acpi_cpu_notifier =
{
.notifier_call = acpi_cpu_soft_notify,
};
static int acpi_processor_add(struct acpi_device *device) static int acpi_processor_add(struct acpi_device *device)
{ {
struct acpi_processor *pr = NULL; struct acpi_processor *pr = NULL;
...@@ -987,6 +1006,7 @@ void acpi_processor_install_hotplug_notify(void) ...@@ -987,6 +1006,7 @@ void acpi_processor_install_hotplug_notify(void)
ACPI_UINT32_MAX, ACPI_UINT32_MAX,
processor_walk_namespace_cb, &action, NULL); processor_walk_namespace_cb, &action, NULL);
#endif #endif
register_hotcpu_notifier(&acpi_cpu_notifier);
} }
static static
...@@ -999,6 +1019,7 @@ void acpi_processor_uninstall_hotplug_notify(void) ...@@ -999,6 +1019,7 @@ void acpi_processor_uninstall_hotplug_notify(void)
ACPI_UINT32_MAX, ACPI_UINT32_MAX,
processor_walk_namespace_cb, &action, NULL); processor_walk_namespace_cb, &action, NULL);
#endif #endif
unregister_hotcpu_notifier(&acpi_cpu_notifier);
} }
/* /*
......
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