]> Git Repo - linux.git/commitdiff
kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling
authorNicholas Piggin <[email protected]>
Thu, 26 Nov 2020 10:25:29 +0000 (20:25 +1000)
committerMichael Ellerman <[email protected]>
Thu, 26 Nov 2020 13:10:39 +0000 (00:10 +1100)
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: Nicholas Piggin <[email protected]>
Reviewed-by: Aneesh Kumar K.V <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
kernel/cpu.c

index 6ff2578ecf17d4691722762553c88f7d68a9bdd1..2b8d7a5db3837078388c42ecd09900748c3ad913 100644 (file)
@@ -815,6 +815,10 @@ void __init cpuhp_threads_init(void)
 }
 
 #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
  * @cpu: a CPU id
@@ -850,7 +854,7 @@ void clear_tasks_mm_cpumask(int cpu)
                t = find_lock_task_mm(p);
                if (!t)
                        continue;
-               cpumask_clear_cpu(cpu, mm_cpumask(t->mm));
+               arch_clear_mm_cpumask_cpu(cpu, t->mm);
                task_unlock(t);
        }
        rcu_read_unlock();
This page took 0.060152 seconds and 4 git commands to generate.