Commit 1c725922 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/cpu hotplug: mask out CPU_TASKS_FROZEN in cu hotplug notifiers

Unify all our cpu hotplug notifiers to mask out the CPU_TASKS_FROZEN
bit, so we don't have to add all the *_FROZEN variant cases to the
notifiers.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 0d0e471b
...@@ -959,13 +959,11 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self, ...@@ -959,13 +959,11 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
struct device *s = &c->dev; struct device *s = &c->dev;
int err = 0; int err = 0;
switch (action) { switch (action & ~CPU_TASKS_FROZEN) {
case CPU_ONLINE: case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
err = sysfs_create_group(&s->kobj, &cpu_online_attr_group); err = sysfs_create_group(&s->kobj, &cpu_online_attr_group);
break; break;
case CPU_DEAD: case CPU_DEAD:
case CPU_DEAD_FROZEN:
sysfs_remove_group(&s->kobj, &cpu_online_attr_group); sysfs_remove_group(&s->kobj, &cpu_online_attr_group);
break; break;
} }
......
...@@ -378,9 +378,8 @@ static int __cpuinit s390_nohz_notify(struct notifier_block *self, ...@@ -378,9 +378,8 @@ static int __cpuinit s390_nohz_notify(struct notifier_block *self,
long cpu = (long) hcpu; long cpu = (long) hcpu;
idle = &per_cpu(s390_idle, cpu); idle = &per_cpu(s390_idle, cpu);
switch (action) { switch (action & ~CPU_TASKS_FROZEN) {
case CPU_DYING: case CPU_DYING:
case CPU_DYING_FROZEN:
idle->nohz_delay = 0; idle->nohz_delay = 0;
default: default:
break; break;
......
...@@ -628,9 +628,8 @@ static int __cpuinit pfault_cpu_notify(struct notifier_block *self, ...@@ -628,9 +628,8 @@ static int __cpuinit pfault_cpu_notify(struct notifier_block *self,
struct thread_struct *thread, *next; struct thread_struct *thread, *next;
struct task_struct *tsk; struct task_struct *tsk;
switch (action) { switch (action & ~CPU_TASKS_FROZEN) {
case CPU_DEAD: case CPU_DEAD:
case CPU_DEAD_FROZEN:
spin_lock_irq(&pfault_lock); spin_lock_irq(&pfault_lock);
list_for_each_entry_safe(thread, next, &pfault_list, list) { list_for_each_entry_safe(thread, next, &pfault_list, list) {
thread->pfault_wait = 0; thread->pfault_wait = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment