]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/processor_core.c
3c59x: check return of pci_enable_device()
[linux-2.6-omap-h63xx.git] / drivers / acpi / processor_core.c
index e944aaee4e064e30aa7a65e2a9249a681f463f0a..9f11dc296cdd7bc29f5545cd8524eb03ede594e3 100644 (file)
@@ -102,6 +102,8 @@ static struct acpi_driver acpi_processor_driver = {
                .add = acpi_processor_add,
                .remove = acpi_processor_remove,
                .start = acpi_processor_start,
+               .suspend = acpi_processor_suspend,
+               .resume = acpi_processor_resume,
                },
 };
 
@@ -724,6 +726,25 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
        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)
 {
        struct acpi_processor *pr = NULL;
@@ -987,6 +1008,7 @@ void acpi_processor_install_hotplug_notify(void)
                            ACPI_UINT32_MAX,
                            processor_walk_namespace_cb, &action, NULL);
 #endif
+       register_hotcpu_notifier(&acpi_cpu_notifier);
 }
 
 static
@@ -999,6 +1021,7 @@ void acpi_processor_uninstall_hotplug_notify(void)
                            ACPI_UINT32_MAX,
                            processor_walk_namespace_cb, &action, NULL);
 #endif
+       unregister_hotcpu_notifier(&acpi_cpu_notifier);
 }
 
 /*