]> err.no Git - linux-2.6/commitdiff
Add suspend-related notifications for CPU hotplug
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 9 May 2007 09:35:10 +0000 (02:35 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 9 May 2007 19:30:56 +0000 (12:30 -0700)
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>
47 files changed:
Documentation/cpu-hotplug.txt
arch/i386/kernel/cpu/intel_cacheinfo.c
arch/i386/kernel/cpu/mcheck/therm_throt.c
arch/i386/kernel/cpuid.c
arch/i386/kernel/microcode.c
arch/i386/kernel/msr.c
arch/ia64/kernel/err_inject.c
arch/ia64/kernel/palinfo.c
arch/ia64/kernel/salinfo.c
arch/ia64/kernel/topology.c
arch/powerpc/kernel/sysfs.c
arch/powerpc/mm/numa.c
arch/s390/appldata/appldata_base.c
arch/s390/kernel/smp.c
arch/x86_64/kernel/mce.c
arch/x86_64/kernel/mce_amd.c
arch/x86_64/kernel/vsyscall.c
block/ll_rw_blk.c
drivers/base/topology.c
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq_stats.c
drivers/hwmon/coretemp.c
drivers/infiniband/hw/ehca/ehca_irq.c
drivers/kvm/kvm_main.c
fs/buffer.c
fs/xfs/xfs_mount.c
include/linux/notifier.h
kernel/cpu.c
kernel/hrtimer.c
kernel/profile.c
kernel/rcupdate.c
kernel/relay.c
kernel/sched.c
kernel/softirq.c
kernel/softlockup.c
kernel/timer.c
kernel/workqueue.c
lib/radix-tree.c
mm/page_alloc.c
mm/slab.c
mm/slub.c
mm/swap.c
mm/vmscan.c
mm/vmstat.c
net/core/dev.c
net/core/flow.c
net/iucv/iucv.c

index cc60d29b954cd394ccd1eba1c27b06bfc049302d..b6d24c22274b8dfb0ea28c3e841594779f5b20e7 100644 (file)
@@ -217,14 +217,17 @@ Q: What happens when a CPU is being logically offlined?
 A: The following happen, listed in no particular order :-)
 
 - A notification is sent to in-kernel registered modules by sending an event
-  CPU_DOWN_PREPARE
+  CPU_DOWN_PREPARE or CPU_DOWN_PREPARE_FROZEN, depending on whether or not the
+  CPU is being offlined while tasks are frozen due to a suspend operation in
+  progress
 - All process is migrated away from this outgoing CPU to a new CPU
 - All interrupts targeted to this CPU is migrated to a new CPU
 - timers/bottom half/task lets are also migrated to a new CPU
 - Once all services are migrated, kernel calls an arch specific routine
   __cpu_disable() to perform arch specific cleanup.
 - Once this is successful, an event for successful cleanup is sent by an event
-  CPU_DEAD.
+  CPU_DEAD (or CPU_DEAD_FROZEN if tasks are frozen due to a suspend while the
+  CPU is being offlined).
 
   "It is expected that each service cleans up when the CPU_DOWN_PREPARE
   notifier is called, when CPU_DEAD is called its expected there is nothing
@@ -242,9 +245,11 @@ A: This is what you would need in your kernel code to receive notifications.
 
                switch (action) {
                case CPU_ONLINE:
+               case CPU_ONLINE_FROZEN:
                        foobar_online_action(cpu);
                        break;
                case CPU_DEAD:
+               case CPU_DEAD_FROZEN:
                        foobar_dead_action(cpu);
                        break;
                }
index 80b4c5d421b1366915028b2002af39cdae851c95..e5be819492ef1daf5bed9ff653dfeaee6f117e24 100644 (file)
@@ -733,9 +733,11 @@ static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb,
        sys_dev = get_cpu_sysdev(cpu);
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                cache_add_dev(sys_dev);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                cache_remove_dev(sys_dev);
                break;
        }
index 065005c3f16879c40fe82e59a53ebc8d95f240c8..5b0a040213c2f0d8baecdae3eb3ea34d052e381f 100644 (file)
@@ -137,10 +137,12 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb,
        mutex_lock(&therm_cpu_lock);
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                err = thermal_throttle_add_dev(sys_dev);
                WARN_ON(err);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                thermal_throttle_remove_dev(sys_dev);
                break;
        }
index eeae0d992337dd3e7c543e683adcc45233abb697..5c2faa10e9fac42f604d0af086af0618835c289d 100644 (file)
@@ -169,9 +169,11 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                cpuid_device_create(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
                break;
        }
index cbe7ec8dbb9f5311ac385ab29bd4cc9266835f5a..7d934e493e74c91dc018357533434514c64adb92 100644 (file)
@@ -775,10 +775,13 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
        sys_dev = get_cpu_sysdev(cpu);
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
        case CPU_DOWN_FAILED:
+       case CPU_DOWN_FAILED_FROZEN:
                mc_sysdev_add(sys_dev);
                break;
        case CPU_DOWN_PREPARE:
+       case CPU_DOWN_PREPARE_FROZEN:
                mc_sysdev_remove(sys_dev);
                break;
        }
index 8cd0a91ce107c84aa525a11fc90331a40cbe7d34..0c1069b8d638031571618701a6f2e09044fd4b59 100644 (file)
@@ -153,9 +153,11 @@ static int msr_class_cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                msr_device_create(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu));
                break;
        }
index d3e9f33e8bddcc816d2a213fb7361e9b1fad7ce8..6a49600cf337f5e468e857ccce5088f12917bfe8 100644 (file)
@@ -236,9 +236,11 @@ static int __cpuinit err_inject_cpu_callback(struct notifier_block *nfb,
        sys_dev = get_cpu_sysdev(cpu);
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                err_inject_add_dev(sys_dev);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                err_inject_remove_dev(sys_dev);
                break;
        }
index a71df9ae03976ccbba7eb5154a639e941938ca44..85829e27785c74912a04a153b163674f38549de0 100644 (file)
@@ -975,9 +975,11 @@ static int palinfo_cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                create_palinfo_proc_entries(hotcpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                remove_palinfo_proc_entries(hotcpu);
                break;
        }
index a51f1d0bfb707c392385eed759ecf7b4d0300b6a..89f6b138a62cc2c7f82f7c0fed22c7fbafcc065a 100644 (file)
@@ -582,6 +582,7 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu
        struct salinfo_data *data;
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                spin_lock_irqsave(&data_saved_lock, flags);
                for (i = 0, data = salinfo_data;
                     i < ARRAY_SIZE(salinfo_data);
@@ -592,6 +593,7 @@ salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu
                spin_unlock_irqrestore(&data_saved_lock, flags);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                spin_lock_irqsave(&data_saved_lock, flags);
                for (i = 0, data = salinfo_data;
                     i < ARRAY_SIZE(salinfo_data);
index 687500ddb4b872a59676396dd04cbed4c7a214ef..94ae3c87d828c5d251d78eceff617d4dc08494e0 100644 (file)
@@ -412,9 +412,11 @@ static int __cpuinit cache_cpu_callback(struct notifier_block *nfb,
        sys_dev = get_cpu_sysdev(cpu);
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                cache_add_dev(sys_dev);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                cache_remove_dev(sys_dev);
                break;
        }
index cae39d9dfe48add64f8be93cff924f630003cfd4..68991c2d4a1b3a6fcb101728c2be0e9724dcf37d 100644 (file)
@@ -342,10 +342,12 @@ static int __cpuinit sysfs_cpu_notify(struct notifier_block *self,
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                register_cpu_online(cpu);
                break;
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                unregister_cpu_online(cpu);
                break;
 #endif
index b3a592b25ab3a7a18e31955af180ab6857763444..de45aa82d97b11c133fb14ccab6fbdf2e2bce450 100644 (file)
@@ -252,12 +252,15 @@ static int __cpuinit cpu_numa_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                numa_setup_cpu(lcpu);
                ret = NOTIFY_OK;
                break;
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
                unmap_cpu_from_node(lcpu);
                break;
                ret = NOTIFY_OK;
index ee89b33145d58584761159391ebea59117db1c51..81a2b92ab0c2b777d2a6dc3b7c594a9ffb547945 100644 (file)
@@ -567,9 +567,11 @@ appldata_cpu_notify(struct notifier_block *self,
 {
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                appldata_online_cpu((long) hcpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                appldata_offline_cpu((long) hcpu);
                break;
        default:
index b7977027a28fa93a8f142bab9e1d7c3245431fa0..09f028a3266ba7698061422c3dfd5c0f2998827a 100644 (file)
@@ -789,10 +789,12 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                if (sysdev_create_file(s, &attr_capability))
                        return NOTIFY_BAD;
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                sysdev_remove_file(s, &attr_capability);
                break;
        }
index 442169640e452ccd4e54240c7ed9684a6d4f5ba8..a14375dd54252d1ca6405e1f28a4e7246ae3cbbe 100644 (file)
@@ -720,9 +720,11 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                mce_create_device(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                mce_remove_device(cpu);
                break;
        }
index d0bd5d66e103d8d491dc728cb06a82dec86425ba..03356e64f9c8cde580f27075e00451440d2751e3 100644 (file)
@@ -654,9 +654,11 @@ static int threshold_cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                threshold_create_device(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                threshold_remove_device(cpu);
                break;
        default:
index dc32cef961950915fbaa185e36ab802d5f7cea3b..51d4c6fa88c8785776354ae0ca115fc46176b7b4 100644 (file)
@@ -327,7 +327,7 @@ static int __cpuinit
 cpu_vsyscall_notifier(struct notifier_block *n, unsigned long action, void *arg)
 {
        long cpu = (long)arg;
-       if (action == CPU_ONLINE)
+       if (action == CPU_ONLINE || action == CPU_ONLINE_FROZEN)
                smp_call_function_single(cpu, cpu_vsyscall_init, NULL, 0, 1);
        return NOTIFY_DONE;
 }
index df506571ed6037382d326f644f79ec47fdf4ced9..cd54672da99f215634f3aa3519041b1ebe8fa344 100644 (file)
@@ -3507,7 +3507,7 @@ static int blk_cpu_notify(struct notifier_block *self, unsigned long action,
         * If a CPU goes away, splice its entries to the current CPU
         * and trigger a run of the softirq
         */
-       if (action == CPU_DEAD) {
+       if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
                int cpu = (unsigned long) hcpu;
 
                local_irq_disable();
index 067a9e8bc377f2cdfe670112bb493714f0faaeaf..8d8cdfec6529e683a194cd49547b81aa8c3680f6 100644 (file)
@@ -126,10 +126,13 @@ static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                rc = topology_add_dev(cpu);
                break;
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                topology_remove_dev(cpu);
                break;
        }
index 893dbaf386fbf41e755239f9538332fbdbd73681..eb37fba9b7efccf163badc70450aee38873b60d3 100644 (file)
@@ -1685,9 +1685,11 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
        if (sys_dev) {
                switch (action) {
                case CPU_ONLINE:
+               case CPU_ONLINE_FROZEN:
                        cpufreq_add_dev(sys_dev);
                        break;
                case CPU_DOWN_PREPARE:
+               case CPU_DOWN_PREPARE_FROZEN:
                        if (unlikely(lock_policy_rwsem_write(cpu)))
                                BUG();
 
@@ -1699,6 +1701,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
                        __cpufreq_remove_dev(sys_dev);
                        break;
                case CPU_DOWN_FAILED:
+               case CPU_DOWN_FAILED_FROZEN:
                        cpufreq_add_dev(sys_dev);
                        break;
                }
index d1c7cac9316cc4e7729f8445c9ba8ebc07d858b7..d2f0cbd8b8f3f294ef7a1f834d52bbfcb2bf02c3 100644 (file)
@@ -313,9 +313,11 @@ static int cpufreq_stat_cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                cpufreq_update_policy(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                cpufreq_stats_free_table(cpu);
                break;
        }
index 03b1f650d1c47d04d7cb2b9b3ca140f50f25b30d..75e3911810a38af22deafc4f68cf1a4205ef5942 100644 (file)
@@ -309,9 +309,11 @@ static int coretemp_cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                coretemp_device_add(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                coretemp_device_remove(cpu);
                break;
        }
index f284be1c916645067aa3b6659925e81040c55fe4..82dda2faf4d0b6b271193b92ec421f60151801b3 100644 (file)
@@ -745,6 +745,7 @@ static int comp_pool_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                ehca_gen_dbg("CPU: %x (CPU_PREPARE)", cpu);
                if(!create_comp_task(pool, cpu)) {
                        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,
                }
                break;
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
                ehca_gen_dbg("CPU: %x (CPU_CANCELED)", cpu);
                cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu);
                kthread_bind(cct->task, any_online_cpu(cpu_online_map));
                destroy_comp_task(pool, cpu);
                break;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                ehca_gen_dbg("CPU: %x (CPU_ONLINE)", cpu);
                cct = per_cpu_ptr(pool->cpu_comp_tasks, cpu);
                kthread_bind(cct->task, cpu);
                wake_up_process(cct->task);
                break;
        case CPU_DOWN_PREPARE:
+       case CPU_DOWN_PREPARE_FROZEN:
                ehca_gen_dbg("CPU: %x (CPU_DOWN_PREPARE)", cpu);
                break;
        case CPU_DOWN_FAILED:
+       case CPU_DOWN_FAILED_FROZEN:
                ehca_gen_dbg("CPU: %x (CPU_DOWN_FAILED)", cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                ehca_gen_dbg("CPU: %x (CPU_DEAD)", cpu);
                destroy_comp_task(pool, cpu);
                take_over_work(pool, cpu);
index c8b8cfa332bb9e7ac9684b12e6efe1e60d06af1f..0d892600ff00f91f48301a871712cbe8e51bb730 100644 (file)
@@ -2889,7 +2889,9 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
 
        switch (val) {
        case CPU_DOWN_PREPARE:
+       case CPU_DOWN_PREPARE_FROZEN:
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
                printk(KERN_INFO "kvm: disabling virtualization on CPU%d\n",
                       cpu);
                decache_vcpus_on_cpu(cpu);
@@ -2897,6 +2899,7 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
                                         NULL, 0, 1);
                break;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                printk(KERN_INFO "kvm: enabling virtualization on CPU%d\n",
                       cpu);
                smp_call_function_single(cpu, kvm_arch_ops->hardware_enable,
index fc2d763a8d7817f3b7ec92ed5598f2a4cd24cf19..aecd057cd0e0607631201d93be38bda0b9e44001 100644 (file)
@@ -2946,7 +2946,7 @@ static void buffer_exit_cpu(int cpu)
 static int buffer_cpu_notify(struct notifier_block *self,
                              unsigned long action, void *hcpu)
 {
-       if (action == CPU_DEAD)
+       if (action == CPU_DEAD || action == CPU_DEAD_FROZEN)
                buffer_exit_cpu((unsigned long)hcpu);
        return NOTIFY_OK;
 }
index f5aa3ef855fbb5e793d4d7f8eeecb507a5dc99fa..a96bde6df96d13cb61a92708aff156ad6b282e97 100644 (file)
@@ -1734,11 +1734,13 @@ xfs_icsb_cpu_notify(
                        per_cpu_ptr(mp->m_sb_cnts, (unsigned long)hcpu);
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                /* Easy Case - initialize the area and locks, and
                 * then rebalance when online does everything else for us. */
                memset(cntp, 0, sizeof(xfs_icsb_cnts_t));
                break;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                xfs_icsb_lock(mp);
                xfs_icsb_balance_counter(mp, XFS_SBS_ICOUNT, 0, 0);
                xfs_icsb_balance_counter(mp, XFS_SBS_IFREE, 0, 0);
@@ -1746,6 +1748,7 @@ xfs_icsb_cpu_notify(
                xfs_icsb_unlock(mp);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                /* Disable all the counters, then fold the dead cpu's
                 * count into the total on the global superblock and
                 * re-enable the counters. */
index 1903e5490c04c2f7b1c818511d5264bd0f526fa3..9431101bf8769508db8dc6263927049d1cfdb9df 100644 (file)
@@ -197,5 +197,17 @@ extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh,
 #define CPU_LOCK_ACQUIRE       0x0008 /* Acquire all hotcpu locks */
 #define CPU_LOCK_RELEASE       0x0009 /* Release all hotcpu locks */
 
+/* Used for CPU hotplug events occuring while tasks are frozen due to a suspend
+ * operation in progress
+ */
+#define CPU_TASKS_FROZEN       0x0010
+
+#define CPU_ONLINE_FROZEN      (CPU_ONLINE | CPU_TASKS_FROZEN)
+#define CPU_UP_PREPARE_FROZEN  (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
+#define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
+#define CPU_DOWN_PREPARE_FROZEN        (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
+#define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
+#define CPU_DEAD_FROZEN                (CPU_DEAD | CPU_TASKS_FROZEN)
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_NOTIFIER_H */
index 28cb6c71a47a141b46d24fb7bf9a82f50522e5cb..369d2892687da7437bcd78e3efb43834b10cc872 100644 (file)
@@ -120,12 +120,13 @@ static int take_cpu_down(void *unused)
 }
 
 /* Requires cpu_add_remove_lock to be held */
-static int _cpu_down(unsigned int cpu)
+static int _cpu_down(unsigned int cpu, int tasks_frozen)
 {
        int err, nr_calls = 0;
        struct task_struct *p;
        cpumask_t old_allowed, tmp;
        void *hcpu = (void *)(long)cpu;
+       unsigned long mod = tasks_frozen ? CPU_TASKS_FROZEN : 0;
 
        if (num_online_cpus() == 1)
                return -EBUSY;
@@ -134,11 +135,11 @@ static int _cpu_down(unsigned int cpu)
                return -EINVAL;
 
        raw_notifier_call_chain(&cpu_chain, CPU_LOCK_ACQUIRE, hcpu);
-       err = __raw_notifier_call_chain(&cpu_chain, CPU_DOWN_PREPARE,
+       err = __raw_notifier_call_chain(&cpu_chain, CPU_DOWN_PREPARE | mod,
                                        hcpu, -1, &nr_calls);
        if (err == NOTIFY_BAD) {
-               __raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED, hcpu,
-                                         nr_calls, NULL);
+               __raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED | mod,
+                                         hcpu, nr_calls, NULL);
                printk("%s: attempt to take down CPU %u failed\n",
                                __FUNCTION__, cpu);
                err = -EINVAL;
@@ -157,7 +158,7 @@ static int _cpu_down(unsigned int cpu)
 
        if (IS_ERR(p) || cpu_online(cpu)) {
                /* CPU didn't die: tell everyone.  Can't complain. */
-               if (raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED,
+               if (raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED | mod,
                                            hcpu) == NOTIFY_BAD)
                        BUG();
 
@@ -176,7 +177,8 @@ static int _cpu_down(unsigned int cpu)
        __cpu_die(cpu);
 
        /* CPU is completely dead: tell everyone.  Too late to complain. */
-       if (raw_notifier_call_chain(&cpu_chain, CPU_DEAD, hcpu) == NOTIFY_BAD)
+       if (raw_notifier_call_chain(&cpu_chain, CPU_DEAD | mod,
+                                   hcpu) == NOTIFY_BAD)
                BUG();
 
        check_for_tasks(cpu);
@@ -186,8 +188,7 @@ out_thread:
 out_allowed:
        set_cpus_allowed(current, old_allowed);
 out_release:
-       raw_notifier_call_chain(&cpu_chain, CPU_LOCK_RELEASE,
-                                               (void *)(long)cpu);
+       raw_notifier_call_chain(&cpu_chain, CPU_LOCK_RELEASE, hcpu);
        return err;
 }
 
@@ -199,7 +200,7 @@ int cpu_down(unsigned int cpu)
        if (cpu_hotplug_disabled)
                err = -EBUSY;
        else
-               err = _cpu_down(cpu);
+               err = _cpu_down(cpu, 0);
 
        mutex_unlock(&cpu_add_remove_lock);
        return err;
@@ -207,16 +208,17 @@ int cpu_down(unsigned int cpu)
 #endif /*CONFIG_HOTPLUG_CPU*/
 
 /* Requires cpu_add_remove_lock to be held */
-static int __cpuinit _cpu_up(unsigned int cpu)
+static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
 {
        int ret, nr_calls = 0;
        void *hcpu = (void *)(long)cpu;
+       unsigned long mod = tasks_frozen ? CPU_TASKS_FROZEN : 0;
 
        if (cpu_online(cpu) || !cpu_present(cpu))
                return -EINVAL;
 
        raw_notifier_call_chain(&cpu_chain, CPU_LOCK_ACQUIRE, hcpu);
-       ret = __raw_notifier_call_chain(&cpu_chain, CPU_UP_PREPARE, hcpu,
+       ret = __raw_notifier_call_chain(&cpu_chain, CPU_UP_PREPARE | mod, hcpu,
                                                        -1, &nr_calls);
        if (ret == NOTIFY_BAD) {
                printk("%s: attempt to bring up CPU %u failed\n",
@@ -234,12 +236,12 @@ static int __cpuinit _cpu_up(unsigned int cpu)
        BUG_ON(!cpu_online(cpu));
 
        /* Now call notifier in preparation. */
-       raw_notifier_call_chain(&cpu_chain, CPU_ONLINE, hcpu);
+       raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu);
 
 out_notify:
        if (ret != 0)
                __raw_notifier_call_chain(&cpu_chain,
-                               CPU_UP_CANCELED, hcpu, nr_calls, NULL);
+                               CPU_UP_CANCELED | mod, hcpu, nr_calls, NULL);
        raw_notifier_call_chain(&cpu_chain, CPU_LOCK_RELEASE, hcpu);
 
        return ret;
@@ -253,7 +255,7 @@ int __cpuinit cpu_up(unsigned int cpu)
        if (cpu_hotplug_disabled)
                err = -EBUSY;
        else
-               err = _cpu_up(cpu);
+               err = _cpu_up(cpu, 0);
 
        mutex_unlock(&cpu_add_remove_lock);
        return err;
@@ -283,7 +285,7 @@ int disable_nonboot_cpus(void)
        for_each_online_cpu(cpu) {
                if (cpu == first_cpu)
                        continue;
-               error = _cpu_down(cpu);
+               error = _cpu_down(cpu, 1);
                if (!error) {
                        cpu_set(cpu, frozen_cpus);
                        printk("CPU%d is down\n", cpu);
@@ -318,7 +320,7 @@ void enable_nonboot_cpus(void)
        suspend_cpu_hotplug = 1;
        printk("Enabling non-boot CPUs ...\n");
        for_each_cpu_mask(cpu, frozen_cpus) {
-               error = _cpu_up(cpu);
+               error = _cpu_up(cpu, 1);
                if (!error) {
                        printk("CPU%d is up\n", cpu);
                        continue;
index c9f4f044a8a8f032e203c2bb81fb73fa1c98c212..23c03f43e1962d6f0dfa4cb8a716080cf671a48c 100644 (file)
@@ -1411,11 +1411,13 @@ static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self,
        switch (action) {
 
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                init_hrtimers_cpu(cpu);
                break;
 
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                clockevents_notify(CLOCK_EVT_NOTIFY_CPU_DEAD, &cpu);
                migrate_hrtimers(cpu);
                break;
index 9bfadb248dd877b009e49710db79957f13188c5d..cc91b9bf759dc5723037d8ac4e2ab2e765372b16 100644 (file)
@@ -340,6 +340,7 @@ static int __devinit profile_cpu_callback(struct notifier_block *info,
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                node = cpu_to_node(cpu);
                per_cpu(cpu_profile_flip, cpu) = 0;
                if (!per_cpu(cpu_profile_hits, cpu)[1]) {
@@ -365,10 +366,13 @@ static int __devinit profile_cpu_callback(struct notifier_block *info,
                __free_page(page);
                return NOTIFY_BAD;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                cpu_set(cpu, prof_cpu_mask);
                break;
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                cpu_clear(cpu, prof_cpu_mask);
                if (per_cpu(cpu_profile_hits, cpu)[0]) {
                        page = virt_to_page(per_cpu(cpu_profile_hits, cpu)[0]);
index 3554b76da84cf08ebc2808b5f2a237a362e52330..2c2dd8410dc4fd8b27d0e66dcd31daceb56ff027 100644 (file)
@@ -558,9 +558,11 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self,
        long cpu = (long)hcpu;
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                rcu_online_cpu(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                rcu_offline_cpu(cpu);
                break;
        default:
index e804589c863c1aa8f7c57f31f83ab8931701038e..61a504900eaa5ba5acb5f3362d5d8105bafe9745 100644 (file)
@@ -484,6 +484,7 @@ static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb,
 
        switch(action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                mutex_lock(&relay_channels_mutex);
                list_for_each_entry(chan, &relay_channels, list) {
                        if (chan->buf[hotcpu])
@@ -500,6 +501,7 @@ static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb,
                mutex_unlock(&relay_channels_mutex);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                /* No need to flush the cpu : will be flushed upon
                 * final relay_flush() call. */
                break;
index fe1a9c2b855a901c713a0722749b608fc47668e4..799d23b4e35dacf56e118d82953102db54c0fdfb 100644 (file)
@@ -5394,6 +5394,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
                break;
 
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                p = kthread_create(migration_thread, hcpu, "migration/%d",cpu);
                if (IS_ERR(p))
                        return NOTIFY_BAD;
@@ -5407,12 +5408,14 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
                break;
 
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                /* Strictly unneccessary, as first user will wake it. */
                wake_up_process(cpu_rq(cpu)->migration_thread);
                break;
 
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
                if (!cpu_rq(cpu)->migration_thread)
                        break;
                /* Unbind it from offline cpu so it can run.  Fall thru. */
@@ -5423,6 +5426,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)
                break;
 
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                migrate_live_tasks(cpu);
                rq = cpu_rq(cpu);
                kthread_stop(rq->migration_thread);
@@ -6912,14 +6916,20 @@ static int update_sched_domains(struct notifier_block *nfb,
 {
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
        case CPU_DOWN_PREPARE:
+       case CPU_DOWN_PREPARE_FROZEN:
                detach_destroy_domains(&cpu_online_map);
                return NOTIFY_OK;
 
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
        case CPU_DOWN_FAILED:
+       case CPU_DOWN_FAILED_FROZEN:
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                /*
                 * Fall through and re-initialise the domains.
                 */
index 8b75008e2bd84bc91db15681896ab1a631091378..0b9886a00e74ba33ed59cafb8b02bc9d01570575 100644 (file)
@@ -593,6 +593,7 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                p = kthread_create(ksoftirqd, hcpu, "ksoftirqd/%d", hotcpu);
                if (IS_ERR(p)) {
                        printk("ksoftirqd for %i failed\n", hotcpu);
@@ -602,16 +603,19 @@ static int __cpuinit cpu_callback(struct notifier_block *nfb,
                per_cpu(ksoftirqd, hotcpu) = p;
                break;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                wake_up_process(per_cpu(ksoftirqd, hotcpu));
                break;
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
                if (!per_cpu(ksoftirqd, hotcpu))
                        break;
                /* Unbind so it can run.  Fall thru. */
                kthread_bind(per_cpu(ksoftirqd, hotcpu),
                             any_online_cpu(cpu_online_map));
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                p = per_cpu(ksoftirqd, hotcpu);
                per_cpu(ksoftirqd, hotcpu) = NULL;
                kthread_stop(p);
index 8fa7040247ad1971125916e3fe903581ecbc56c4..0131e296ffb416435f7c54a935657c624a09d0c5 100644 (file)
@@ -146,6 +146,7 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                BUG_ON(per_cpu(watchdog_task, hotcpu));
                p = kthread_create(watchdog, hcpu, "watchdog/%d", hotcpu);
                if (IS_ERR(p)) {
@@ -157,16 +158,19 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
                kthread_bind(p, hotcpu);
                break;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                wake_up_process(per_cpu(watchdog_task, hotcpu));
                break;
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
                if (!per_cpu(watchdog_task, hotcpu))
                        break;
                /* Unbind so it can run.  Fall thru. */
                kthread_bind(per_cpu(watchdog_task, hotcpu),
                             any_online_cpu(cpu_online_map));
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                p = per_cpu(watchdog_task, hotcpu);
                per_cpu(watchdog_task, hotcpu) = NULL;
                kthread_stop(p);
index 58f6dd07c80bda6083ecf2c9dd6e7dfac4517bbe..de85f8491c1d0c38990cbb382d4900cbf424336b 100644 (file)
@@ -1293,11 +1293,13 @@ static int __cpuinit timer_cpu_notify(struct notifier_block *self,
        long cpu = (long)hcpu;
        switch(action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                if (init_timers_cpu(cpu) < 0)
                        return NOTIFY_BAD;
                break;
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                migrate_timers(cpu);
                break;
 #endif
index b976ed87dd371f26d997393652023245a9177ab3..fb56fedd5c0274a3458bd0e7cbc8ae4e0d86cf6d 100644 (file)
@@ -799,6 +799,8 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
        struct cpu_workqueue_struct *cwq;
        struct workqueue_struct *wq;
 
+       action &= ~CPU_TASKS_FROZEN;
+
        switch (action) {
        case CPU_LOCK_ACQUIRE:
                mutex_lock(&workqueue_mutex);
index d69ddbe438655be6b65672d2c7366371baadfd85..402eb4eb6b23634492245c4393a0c2829de81de0 100644 (file)
@@ -1004,7 +1004,7 @@ static int radix_tree_callback(struct notifier_block *nfb,
        struct radix_tree_preload *rtp;
 
        /* Free per-cpu pool of perloaded nodes */
-       if (action == CPU_DEAD) {
+       if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
                rtp = &per_cpu(radix_tree_preloads, cpu);
                while (rtp->nr) {
                        kmem_cache_free(radix_tree_node_cachep,
index 6fd0b7455b0be26a476a72ff229794b4f64c8d85..d53cbf8acb8e1018e36424cdefbeb92dcd548f15 100644 (file)
@@ -2148,11 +2148,14 @@ static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                if (process_zones(cpu))
                        ret = NOTIFY_BAD;
                break;
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                free_zone_pagesets(cpu);
                break;
        default:
@@ -3012,7 +3015,7 @@ static int page_alloc_cpu_notify(struct notifier_block *self,
 {
        int cpu = (unsigned long)hcpu;
 
-       if (action == CPU_DEAD) {
+       if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
                local_irq_disable();
                __drain_pages(cpu);
                vm_events_fold_cpu(cpu);
index 1a7a10de2a4d21737a4e89281a7d2a7b56ec214f..6f3d6e240c611d65fe8e8d8cbe3722a4ebe8117c 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1190,6 +1190,7 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
                mutex_lock(&cache_chain_mutex);
                break;
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                /*
                 * We need to do this right in the beginning since
                 * alloc_arraycache's are going to use this list.
@@ -1276,10 +1277,12 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
                }
                break;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                start_cpu_timer(cpu);
                break;
 #ifdef CONFIG_HOTPLUG_CPU
        case CPU_DOWN_PREPARE:
+       case CPU_DOWN_PREPARE_FROZEN:
                /*
                 * Shutdown cache reaper. Note that the cache_chain_mutex is
                 * held so that if cache_reap() is invoked it cannot do
@@ -1291,9 +1294,11 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
                per_cpu(reap_work, cpu).work.func = NULL;
                break;
        case CPU_DOWN_FAILED:
+       case CPU_DOWN_FAILED_FROZEN:
                start_cpu_timer(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                /*
                 * Even if all the cpus of a node are down, we don't free the
                 * kmem_list3 of any cache. This to avoid a race between
@@ -1305,6 +1310,7 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb,
                /* fall thru */
 #endif
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
                list_for_each_entry(cachep, &cache_chain, next) {
                        struct array_cache *nc;
                        struct array_cache *shared;
index f7c120b93c41fa14022cb64dc28a36fb2d61f109..a581fa8ae11aa60f264a296534fa991fd8064dfe 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2514,7 +2514,9 @@ static int __cpuinit slab_cpuup_callback(struct notifier_block *nfb,
 
        switch (action) {
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                for_all_slabs(__flush_cpu_slab, cpu);
                break;
        default:
index 218c52a24a216831a347736cde51045563854770..d3cb966fe9920734f9c97a1fb27cdda36829f493 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -488,7 +488,7 @@ static int cpu_swap_callback(struct notifier_block *nfb,
        long *committed;
 
        committed = &per_cpu(committed_space, (long)hcpu);
-       if (action == CPU_DEAD) {
+       if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
                atomic_add(*committed, &vm_committed_space);
                *committed = 0;
                __lru_add_drain((long)hcpu);
index 1c8e75a1cfcd30dba6a59c84de754f9dd9be8ec6..1be5a6376ef0719b5e46937924a8a66cf59a35f1 100644 (file)
@@ -1528,7 +1528,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb,
        pg_data_t *pgdat;
        cpumask_t mask;
 
-       if (action == CPU_ONLINE) {
+       if (action == CPU_ONLINE || action == CPU_ONLINE_FROZEN) {
                for_each_online_pgdat(pgdat) {
                        mask = node_to_cpumask(pgdat->node_id);
                        if (any_online_cpu(mask) != NR_CPUS)
index 6c488d6ac425d948b7b77d78a6cac899be16af6a..9a66dc4aed438fbdeeb59cae1593254d12fcd2f9 100644 (file)
@@ -650,8 +650,11 @@ static int __cpuinit vmstat_cpuup_callback(struct notifier_block *nfb,
 {
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                refresh_zone_stat_thresholds();
                break;
        default:
index 4317c1be4d3ff658fa8f8eec221aa8b96f247aaf..8301e2ac747fcf7500a9c3e2999061033b686637 100644 (file)
@@ -3450,7 +3450,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
        unsigned int cpu, oldcpu = (unsigned long)ocpu;
        struct softnet_data *sd, *oldsd;
 
-       if (action != CPU_DEAD)
+       if (action != CPU_DEAD && action != CPU_DEAD_FROZEN)
                return NOTIFY_OK;
 
        local_irq_disable();
index 5d25697920b1ae183fe83e627044c601cb845632..051430545a05364bb9864df299c93130edaa626a 100644 (file)
@@ -338,7 +338,7 @@ static int flow_cache_cpu(struct notifier_block *nfb,
                          unsigned long action,
                          void *hcpu)
 {
-       if (action == CPU_DEAD)
+       if (action == CPU_DEAD || action == CPU_DEAD_FROZEN)
                __flow_cache_shrink((unsigned long)hcpu, 0);
        return NOTIFY_OK;
 }
index fb3faf72e8508f73cea2e435182ea534f84a0ecc..b7333061016dfffbf8122460f63dda56e724a3c8 100644 (file)
@@ -556,6 +556,7 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
 
        switch (action) {
        case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
                if (!percpu_populate(iucv_irq_data,
                                     sizeof(struct iucv_irq_data),
                                     GFP_KERNEL|GFP_DMA, cpu))
@@ -567,15 +568,20 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
                }
                break;
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                percpu_depopulate(iucv_param, cpu);
                percpu_depopulate(iucv_irq_data, cpu);
                break;
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
        case CPU_DOWN_FAILED:
+       case CPU_DOWN_FAILED_FROZEN:
                smp_call_function_on(iucv_declare_cpu, NULL, 0, 1, cpu);
                break;
        case CPU_DOWN_PREPARE:
+       case CPU_DOWN_PREPARE_FROZEN:
                cpumask = iucv_buffer_cpumask;
                cpu_clear(cpu, cpumask);
                if (cpus_empty(cpumask))