aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/processor_core.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index e944aaee4e06..2afb3d2086b3 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -724,6 +724,25 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
724 return; 724 return;
725} 725}
726 726
727static int acpi_cpu_soft_notify(struct notifier_block *nfb,
728 unsigned long action, void *hcpu)
729{
730 unsigned int cpu = (unsigned long)hcpu;
731 struct acpi_processor *pr = processors[cpu];
732
733 if (action == CPU_ONLINE && pr) {
734 acpi_processor_ppc_has_changed(pr);
735 acpi_processor_cst_has_changed(pr);
736 acpi_processor_tstate_has_changed(pr);
737 }
738 return NOTIFY_OK;
739}
740
741static struct notifier_block acpi_cpu_notifier =
742{
743 .notifier_call = acpi_cpu_soft_notify,
744};
745
727static int acpi_processor_add(struct acpi_device *device) 746static int acpi_processor_add(struct acpi_device *device)
728{ 747{
729 struct acpi_processor *pr = NULL; 748 struct acpi_processor *pr = NULL;
@@ -987,6 +1006,7 @@ void acpi_processor_install_hotplug_notify(void)
987 ACPI_UINT32_MAX, 1006 ACPI_UINT32_MAX,
988 processor_walk_namespace_cb, &action, NULL); 1007 processor_walk_namespace_cb, &action, NULL);
989#endif 1008#endif
1009 register_hotcpu_notifier(&acpi_cpu_notifier);
990} 1010}
991 1011
992static 1012static
@@ -999,6 +1019,7 @@ void acpi_processor_uninstall_hotplug_notify(void)
999 ACPI_UINT32_MAX, 1019 ACPI_UINT32_MAX,
1000 processor_walk_namespace_cb, &action, NULL); 1020 processor_walk_namespace_cb, &action, NULL);
1001#endif 1021#endif
1022 unregister_hotcpu_notifier(&acpi_cpu_notifier);
1002} 1023}
1003 1024
1004/* 1025/*