diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-05-24 09:08:18 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-08-02 15:22:18 +0300 |
commit | c3c2e93753484bb4e935ed8205c1f569907f5970 (patch) | |
tree | 55a5f271fb496d435ae6b1c36766c125d9c5e7fb /arch/powerpc/mm | |
parent | ab481817912ec5c882a6a42ce12c57aed3cfd506 (diff) | |
download | linux-c3c2e93753484bb4e935ed8205c1f569907f5970.tar.xz |
powerpc: Account mm_cpumask and active_cpus in init_mm
init_mm mm_cpumask and context.active_cpus is not maintained at boot
and hotplug. This seems to be harmless because init_mm does not have a
userspace and so never gets user TLBs flushed, but it looks odd and it
prevents some sanity checks being added.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230524060821.148015-2-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/mmu_context.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mmu_context.c b/arch/powerpc/mm/mmu_context.c index 1fb9c99f8679..894468975a44 100644 --- a/arch/powerpc/mm/mmu_context.c +++ b/arch/powerpc/mm/mmu_context.c @@ -47,6 +47,7 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next, /* Mark this context has been used on the new CPU */ if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(next))) { + VM_WARN_ON_ONCE(next == &init_mm); cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); inc_mm_active_cpus(next); |