Skip to content

Commit 8ff0039

Browse files
npigginmpe
authored andcommitted
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: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201126102530.691335-4-npiggin@gmail.com
1 parent c0b27c5 commit 8ff0039

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

kernel/cpu.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,10 @@ void __init cpuhp_threads_init(void)
815815
}
816816

817817
#ifdef CONFIG_HOTPLUG_CPU
818+
#ifndef arch_clear_mm_cpumask_cpu
819+
#define arch_clear_mm_cpumask_cpu(cpu, mm) cpumask_clear_cpu(cpu, mm_cpumask(mm))
820+
#endif
821+
818822
/**
819823
* clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU
820824
* @cpu: a CPU id
@@ -850,7 +854,7 @@ void clear_tasks_mm_cpumask(int cpu)
850854
t = find_lock_task_mm(p);
851855
if (!t)
852856
continue;
853-
cpumask_clear_cpu(cpu, mm_cpumask(t->mm));
857+
arch_clear_mm_cpumask_cpu(cpu, t->mm);
854858
task_unlock(t);
855859
}
856860
rcu_read_unlock();

0 commit comments

Comments
 (0)