Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/mm: Select ARCH_WANT_IRQS_OFF_ACTIVATE_MM

Select ARCH_WANT_IRQS_OFF_ACTIVATE_MM so that activate_mm() is called with
irqs disabled. This allows to call switch_mm_irqs_off() instead of
switch_mm() and saves two local_irq_save() / local_irq_restore() pairs.

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

+2 -5
+1
arch/s390/Kconfig
··· 146 146 select ARCH_WANTS_NO_INSTR 147 147 select ARCH_WANT_DEFAULT_BPF_JIT 148 148 select ARCH_WANT_IPC_PARSE_VERSION 149 + select ARCH_WANT_IRQS_OFF_ACTIVATE_MM 149 150 select ARCH_WANT_KERNEL_PMD_MKWRITE 150 151 select ARCH_WANT_LD_ORPHAN_WARN 151 152 select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
+1 -5
arch/s390/include/asm/mmu_context.h
··· 124 124 static inline void activate_mm(struct mm_struct *prev, 125 125 struct mm_struct *next) 126 126 { 127 - unsigned long flags; 128 - 129 - switch_mm(prev, next, current); 127 + switch_mm_irqs_off(prev, next, current); 130 128 cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); 131 - local_irq_save(flags); 132 129 if (test_thread_flag(TIF_ASCE_PRIMARY)) 133 130 local_ctl_load(1, &get_lowcore()->kernel_asce); 134 131 else 135 132 local_ctl_load(1, &get_lowcore()->user_asce); 136 133 local_ctl_load(7, &get_lowcore()->user_asce); 137 - local_irq_restore(flags); 138 134 } 139 135 140 136 #include <asm-generic/mmu_context.h>