]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/s390/include/asm/mmu_context.h
UBUNTU: SAUCE: s390/mm: fix local TLB flushing vs. detach of an mm address space
[mirror_ubuntu-zesty-kernel.git] / arch / s390 / include / asm / mmu_context.h
index 67f7a991c929bb92731c6aafeef4a1255d69c959..d9451467c5f2dc2afe2952fd99a8c0c8cae45276 100644 (file)
@@ -93,7 +93,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
        if (prev == next)
                return;
        cpumask_set_cpu(cpu, &next->context.cpu_attach_mask);
-       cpumask_set_cpu(cpu, mm_cpumask(next));
        /* Clear old ASCE by loading the kernel ASCE. */
        __ctl_load(S390_lowcore.kernel_asce, 1, 1);
        __ctl_load(S390_lowcore.kernel_asce, 7, 7);
@@ -111,7 +110,7 @@ static inline void finish_arch_post_lock_switch(void)
                preempt_disable();
                while (atomic_read(&mm->context.flush_count))
                        cpu_relax();
-
+               cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
                if (mm->context.flush_mm)
                        __tlb_flush_mm(mm);
                preempt_enable();
@@ -126,6 +125,7 @@ static inline void activate_mm(struct mm_struct *prev,
                                struct mm_struct *next)
 {
        switch_mm(prev, next, current);
+       cpumask_set_cpu(smp_processor_id(), mm_cpumask(next));
        set_user_asce(next);
 }