Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=729c6ba334771f28a54efd7e3b8f5ab9414ce7bc
Commit:     729c6ba334771f28a54efd7e3b8f5ab9414ce7bc
Parent:     6a669ee8a790487b7ec1edda762d39615a78264b
Author:     Venkatesh Pallipadi <[EMAIL PROTECTED]>
AuthorDate: Sun Sep 16 15:36:43 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED](none)>
CommitDate: Sun Sep 16 15:36:43 2007 +0200

    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: Venkatesh Pallipadi <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
    Cc: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/processor_core.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index e944aae..2afb3d2 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)
        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 +1006,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 +1019,7 @@ void acpi_processor_uninstall_hotplug_notify(void)
                            ACPI_UINT32_MAX,
                            processor_walk_namespace_cb, &action, NULL);
 #endif
+       unregister_hotcpu_notifier(&acpi_cpu_notifier);
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to