diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-05-09 05:35:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:56 -0400 |
commit | 8bb7844286fb8c9fce6f65d8288aeb09d03a5e0d (patch) | |
tree | f4e305edaedbde05774bb1e4acd89a9475661d2e /drivers/infiniband | |
parent | f37bc2712b54ec641e0c0c8634f1a4b61d9956c0 (diff) |
Add suspend-related notifications for CPU hotplug
Since nonboot CPUs are now disabled after tasks and devices have been
frozen and the CPU hotplug infrastructure is used for this purpose, we need
special CPU hotplug notifications that will help the CPU-hotplug-aware
subsystems distinguish normal CPU hotplug events from CPU hotplug events
related to a system-wide suspend or resume operation in progress. This
patch introduces such notifications and causes them to be used during
suspend and resume transitions. It also changes all of the
CPU-hotplug-aware subsystems to take these notifications into consideration
(for now they are handled in the same way as the corresponding "normal"
ones).
[oleg@tv-sign.ru: cleanups]
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_irq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index f284be1c9166..82dda2faf4d0 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c | |||
@@ -745,6 +745,7 @@ static int comp_pool_callback(struct notifier_block *nfb, | |||
745 | 745 | ||
746 | switch (action) { | 746 | switch (action) { |
747 | case CPU_UP_PREPARE: | 747 | case CPU_UP_PREPARE: |
748 | case CPU_UP_PREPARE_FROZEN: | ||
748 | ehca_gen_dbg("CPU: %x (CPU_PREPARE)", cpu); | 749 | ehca_gen_dbg("CPU: %x (CPU_PREPARE)", cpu); |
749 | if(!create_comp_task(pool, cpu)) { | 750 | if(!create_comp_task(pool, cpu)) { |
750 | ehca_gen_err("Can't create comp_task for cpu: %x", cpu); | 751 | ehca_gen_err("Can't create comp_task for cpu: %x", cpu); |
@@ -752,24 +753,29 @@ static int comp_pool_callback(struct notifier_block *nfb, | |||
752 | } | 753 | } |
753 | break; | 754 | break; |
754 | case CPU_UP_CANCELED: | 755 | case CPU_UP_CANCELED: |
756 | case CPU_UP_CANCELED_FROZEN: | ||
755 | ehca_gen_dbg("CPU: %x (CPU_CANCELED)", cpu); | 757 | ehca_gen_dbg("CPU: %x (CPU_CANCELED)", cpu); |
756 | cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu); | 758 | cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu); |
757 | kthread_bind(cct->task, any_online_cpu(cpu_online_map)); | 759 | kthread_bind(cct->task, any_online_cpu(cpu_online_map)); |
758 | destroy_comp_task(pool, cpu); | 760 | destroy_comp_task(pool, cpu); |
759 | break; | 761 | break; |
760 | case CPU_ONLINE: | 762 | case CPU_ONLINE: |
763 | case CPU_ONLINE_FROZEN: | ||
761 | ehca_gen_dbg("CPU: %x (CPU_ONLINE)", cpu); | 764 | ehca_gen_dbg("CPU: %x (CPU_ONLINE)", cpu); |
762 | cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu); | 765 | cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu); |
763 | kthread_bind(cct->task, cpu); | 766 | kthread_bind(cct->task, cpu); |
764 | wake_up_process(cct->task); | 767 | wake_up_process(cct->task); |
765 | break; | 768 | break; |
766 | case CPU_DOWN_PREPARE: | 769 | case CPU_DOWN_PREPARE: |
770 | case CPU_DOWN_PREPARE_FROZEN: | ||
767 | ehca_gen_dbg("CPU: %x (CPU_DOWN_PREPARE)", cpu); | 771 | ehca_gen_dbg("CPU: %x (CPU_DOWN_PREPARE)", cpu); |
768 | break; | 772 | break; |
769 | case CPU_DOWN_FAILED: | 773 | case CPU_DOWN_FAILED: |
774 | case CPU_DOWN_FAILED_FROZEN: | ||
770 | ehca_gen_dbg("CPU: %x (CPU_DOWN_FAILED)", cpu); | 775 | ehca_gen_dbg("CPU: %x (CPU_DOWN_FAILED)", cpu); |
771 | break; | 776 | break; |
772 | case CPU_DEAD: | 777 | case CPU_DEAD: |
778 | case CPU_DEAD_FROZEN: | ||
773 | ehca_gen_dbg("CPU: %x (CPU_DEAD)", cpu); | 779 | ehca_gen_dbg("CPU: %x (CPU_DEAD)", cpu); |
774 | destroy_comp_task(pool, cpu); | 780 | destroy_comp_task(pool, cpu); |
775 | take_over_work(pool, cpu); | 781 | take_over_work(pool, cpu); |