Subject: linux-next: manual merge of the s390 tree with the asm-generic tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 24 Nov 2020 10:25:14 +1100

Hi all,

FIXME: Add owner of second tree to To:
       Add author(s)/SOB of conflicting commits.

Today's linux-next merge of the s390 tree got a conflict in:

  arch/s390/include/asm/mmu_context.h

between commit:

  93e2dfd39438 ("s390: use asm-generic/mmu_context.h for no-op implementations")

from the asm-generic tree and commits:

  ab177c5d00cd ("s390/mm: remove unused clear_user_asce()")
  87d598634521 ("s390/mm: remove set_fs / rework address space handling")

from the s390 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/s390/include/asm/mmu_context.h
index 66f9cf0a07e3,87a84fc59fc3..000000000000
--- a/arch/s390/include/asm/mmu_context.h
+++ b/arch/s390/include/asm/mmu_context.h
@@@ -70,23 -69,8 +70,6 @@@ static inline int init_new_context(stru
  	return 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);
 -#define destroy_context(mm)             do { } while (0)
--
  static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
  			     struct task_struct *tsk)
  {
@@@ -121,18 -98,18 +97,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 */