Skip to content

Commit fe20164

Browse files
committed
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>
1 parent 8b72f5a commit fe20164

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

arch/s390/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ config S390
146146
select ARCH_WANTS_NO_INSTR
147147
select ARCH_WANT_DEFAULT_BPF_JIT
148148
select ARCH_WANT_IPC_PARSE_VERSION
149+
select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
149150
select ARCH_WANT_KERNEL_PMD_MKWRITE
150151
select ARCH_WANT_LD_ORPHAN_WARN
151152
select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP

arch/s390/include/asm/mmu_context.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,13 @@ static inline void finish_arch_post_lock_switch(void)
124124
static inline void activate_mm(struct mm_struct *prev,
125125
struct mm_struct *next)
126126
{
127-
unsigned long flags;
128-
129-
switch_mm(prev, next, current);
127+
switch_mm_irqs_off(prev, next, current);
130128
cpumask_set_cpu(smp_processor_id(), mm_cpumask(next));
131-
local_irq_save(flags);
132129
if (test_thread_flag(TIF_ASCE_PRIMARY))
133130
local_ctl_load(1, &get_lowcore()->kernel_asce);
134131
else
135132
local_ctl_load(1, &get_lowcore()->user_asce);
136133
local_ctl_load(7, &get_lowcore()->user_asce);
137-
local_irq_restore(flags);
138134
}
139135

140136
#include <asm-generic/mmu_context.h>

0 commit comments

Comments
 (0)