From: Heiko Carstens Date: Wed, 9 Apr 2025 13:01:51 +0000 (+0200) Subject: s390/mm: Select ARCH_WANT_IRQS_OFF_ACTIVATE_MM X-Git-Tag: v6.16-rc1~201^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe20164177be007f490b79db94ed8d65c4e48bb0;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Heiko Carstens --- diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 99fb986fca6e8..0c16dc443e2f6 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -146,6 +146,7 @@ config S390 select ARCH_WANTS_NO_INSTR select ARCH_WANT_DEFAULT_BPF_JIT select ARCH_WANT_IPC_PARSE_VERSION + select ARCH_WANT_IRQS_OFF_ACTIVATE_MM select ARCH_WANT_KERNEL_PMD_MKWRITE select ARCH_WANT_LD_ORPHAN_WARN select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index dabc51511b891..d9b8501bc93d0 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h @@ -124,17 +124,13 @@ static inline void finish_arch_post_lock_switch(void) static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { - unsigned long flags; - - switch_mm(prev, next, current); + switch_mm_irqs_off(prev, next, current); cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); - local_irq_save(flags); if (test_thread_flag(TIF_ASCE_PRIMARY)) local_ctl_load(1, &get_lowcore()->kernel_asce); else local_ctl_load(1, &get_lowcore()->user_asce); local_ctl_load(7, &get_lowcore()->user_asce); - local_irq_restore(flags); } #include