From: Petr Tesarik <ptesarik@suse.cz>
Subject: kabi: move s390 mm_context_t lock to mm_struct and ignore the change
Patch-mainline: Never, kABI
References: bsc#1103421
[js] added by commit 60f07c8ec5fae06c23e9fd7bab67dabce92b3414.
mm_struct is global only in the mm core files and the struct is
not embedded anywhere except efi/arm-runtime (ARM there vs s390
here). So this is hopefully OK.
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
arch/s390/include/asm/mmu.h | 3 +--
arch/s390/include/asm/mmu_context.h | 2 +-
arch/s390/include/asm/tlbflush.h | 4 ++--
include/linux/mm_types.h | 3 +++
4 files changed, 7 insertions(+), 5 deletions(-)
--- a/arch/s390/include/asm/mmu.h
+++ b/arch/s390/include/asm/mmu.h
@@ -5,7 +5,6 @@
#include <linux/errno.h>
typedef struct {
- spinlock_t lock;
cpumask_t cpu_attach_mask;
atomic_t flush_count;
unsigned int flush_mm;
@@ -28,7 +27,7 @@ typedef struct {
} mm_context_t;
#define INIT_MM_CONTEXT(name) \
- .context.lock = __SPIN_LOCK_UNLOCKED(name.context.lock), \
+ .mm_context_lock = __SPIN_LOCK_UNLOCKED(name.mm_context_lock), \
.context.pgtable_lock = \
__SPIN_LOCK_UNLOCKED(name.context.pgtable_lock), \
.context.pgtable_list = LIST_HEAD_INIT(name.context.pgtable_list), \
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -508,6 +508,9 @@ struct mm_struct {
/* HMM needs to track a few things per mm */
struct hmm *hmm;
#endif
+#if defined(CONFIG_S390) && !defined(__GENKSYMS__)
+ spinlock_t mm_context_lock;
+#endif
};
extern struct mm_struct init_mm;
--- a/arch/s390/include/asm/mmu_context.h
+++ b/arch/s390/include/asm/mmu_context.h
@@ -17,7 +17,7 @@
static inline int init_new_context(struct task_struct *tsk,
struct mm_struct *mm)
{
- spin_lock_init(&mm->context.lock);
+ spin_lock_init(&mm->mm_context_lock);
spin_lock_init(&mm->context.pgtable_lock);
INIT_LIST_HEAD(&mm->context.pgtable_list);
spin_lock_init(&mm->context.gmap_lock);
--- a/arch/s390/include/asm/tlbflush.h
+++ b/arch/s390/include/asm/tlbflush.h
@@ -101,12 +101,12 @@ static inline void __tlb_flush_kernel(vo
static inline void __tlb_flush_mm_lazy(struct mm_struct * mm)
{
- spin_lock(&mm->context.lock);
+ spin_lock(&mm->mm_context_lock);
if (mm->context.flush_mm) {
mm->context.flush_mm = 0;
__tlb_flush_mm(mm);
}
- spin_unlock(&mm->context.lock);
+ spin_unlock(&mm->mm_context_lock);
}
/*