Commit 8ff00399 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling

powerpc/64s keeps a counter in the mm which counts bits set in
mm_cpumask as well as other things. This means it can't use generic code
to clear bits out of the mask and doesn't adjust the arch specific
counter.

Add an arch override that allows powerpc/64s to use
clear_tasks_mm_cpumask().
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201126102530.691335-4-npiggin@gmail.com
parent c0b27c51
...@@ -815,6 +815,10 @@ void __init cpuhp_threads_init(void) ...@@ -815,6 +815,10 @@ void __init cpuhp_threads_init(void)
} }
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
#ifndef arch_clear_mm_cpumask_cpu
#define arch_clear_mm_cpumask_cpu(cpu, mm) cpumask_clear_cpu(cpu, mm_cpumask(mm))
#endif
/** /**
* clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU * clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU
* @cpu: a CPU id * @cpu: a CPU id
...@@ -850,7 +854,7 @@ void clear_tasks_mm_cpumask(int cpu) ...@@ -850,7 +854,7 @@ void clear_tasks_mm_cpumask(int cpu)
t = find_lock_task_mm(p); t = find_lock_task_mm(p);
if (!t) if (!t)
continue; continue;
cpumask_clear_cpu(cpu, mm_cpumask(t->mm)); arch_clear_mm_cpumask_cpu(cpu, t->mm);
task_unlock(t); task_unlock(t);
} }
rcu_read_unlock(); rcu_read_unlock();
......
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