From ed183f78fa936d54ffaad8db99736a2f684fb812 Mon Sep 17 00:00:00 2001 From: Venkatesh Pallipadi Date: Sun, 16 Sep 2007 15:36:43 +0200 Subject: [PATCH] --- yaml --- r: 64981 b: refs/heads/master c: 729c6ba334771f28a54efd7e3b8f5ab9414ce7bc h: refs/heads/master i: 64979: 25fce1054378021d526931be274e06c339d7efa6 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/processor_core.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d857d7dda26a..d32f8464905b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6a669ee8a790487b7ec1edda762d39615a78264b +refs/heads/master: 729c6ba334771f28a54efd7e3b8f5ab9414ce7bc diff --git a/trunk/drivers/acpi/processor_core.c b/trunk/drivers/acpi/processor_core.c index e944aaee4e06..2afb3d2086b3 100644 --- a/trunk/drivers/acpi/processor_core.c +++ b/trunk/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); } /*