Merge tag 'asm-generic-mmu-context-5.11' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2020 07:58:04 +0000 (23:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2020 07:58:04 +0000 (23:58 -0800)
Pull asm-generic mmu-context cleanup from Arnd Bergmann:
 "This is a cleanup series from Nicholas Piggin, preparing for later
  changes. The asm/mmu_context.h header are generalized and common code
  moved to asm-gneneric/mmu_context.h.

  This saves a bit of code and makes it easier to change in the future"

* tag 'asm-generic-mmu-context-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (25 commits)
  h8300: Fix generic mmu_context build
  m68k: mmu_context: Fix Sun-3 build
  xtensa: use asm-generic/mmu_context.h for no-op implementations
  x86: use asm-generic/mmu_context.h for no-op implementations
  um: use asm-generic/mmu_context.h for no-op implementations
  sparc: use asm-generic/mmu_context.h for no-op implementations
  sh: use asm-generic/mmu_context.h for no-op implementations
  s390: use asm-generic/mmu_context.h for no-op implementations
  riscv: use asm-generic/mmu_context.h for no-op implementations
  powerpc: use asm-generic/mmu_context.h for no-op implementations
  parisc: use asm-generic/mmu_context.h for no-op implementations
  openrisc: use asm-generic/mmu_context.h for no-op implementations
  nios2: use asm-generic/mmu_context.h for no-op implementations
  nds32: use asm-generic/mmu_context.h for no-op implementations
  mips: use asm-generic/mmu_context.h for no-op implementations
  microblaze: use asm-generic/mmu_context.h for no-op implementations
  m68k: use asm-generic/mmu_context.h for no-op implementations
  ia64: use asm-generic/mmu_context.h for no-op implementations
  hexagon: use asm-generic/mmu_context.h for no-op implementations
  csky: use asm-generic/mmu_context.h for no-op implementations
  ...

1  2 
arch/arm64/include/asm/mmu_context.h
arch/s390/include/asm/mmu_context.h
arch/x86/include/asm/mmu_context.h

Simple merge
index 5dc49c467319f6f3b030d5b68c5f5fb801645f5c,66f9cf0a07e3cbfb9fced6ad5566b17e23c2d444..e7cffc7b5c2f65a95953570dadf988921c1fce7d
@@@ -69,8 -70,23 +70,6 @@@ static inline int init_new_context(stru
        return 0;
  }
  
- #define destroy_context(mm)             do { } while (0)
 -static inline void set_user_asce(struct mm_struct *mm)
 -{
 -      S390_lowcore.user_asce = mm->context.asce;
 -      __ctl_load(S390_lowcore.user_asce, 1, 1);
 -      clear_cpu_flag(CIF_ASCE_PRIMARY);
 -}
 -
 -static inline void clear_user_asce(void)
 -{
 -      S390_lowcore.user_asce = S390_lowcore.kernel_asce;
 -      __ctl_load(S390_lowcore.kernel_asce, 1, 1);
 -      set_cpu_flag(CIF_ASCE_PRIMARY);
 -}
 -
 -mm_segment_t enable_sacf_uaccess(void);
 -void disable_sacf_uaccess(mm_segment_t old_fs);
--
  static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
                             struct task_struct *tsk)
  {
@@@ -101,18 -121,18 +100,18 @@@ static inline void finish_arch_post_loc
                __tlb_flush_mm_lazy(mm);
                preempt_enable();
        }
 -      set_fs(current->thread.mm_segment);
 +      __ctl_load(S390_lowcore.user_asce, 7, 7);
  }
  
- #define enter_lazy_tlb(mm,tsk)        do { } while (0)
- #define deactivate_mm(tsk,mm) do { } while (0)
+ #define activate_mm activate_mm
  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);
 +      __ctl_load(S390_lowcore.user_asce, 7, 7);
  }
  
+ #include <asm-generic/mmu_context.h>
  #endif /* __S390_MMU_CONTEXT_H */
Simple merge