Commit
60f07c8ec5fa "s390/mm: fix race on mm->context.flush_mm" added
a field to the s390 definition of mm_context_t. This is embedded in
the arch-indepdendent struct mm_struct, so adding a new field results
in an incompatible change to the layout of the larger struct.
Move the new field out of mm_context_t to the end of mm_struct, and
hide the change from genksyms.
Gbp-Pq: Topic debian
Gbp-Pq: Name s390-mm-avoid-abi-change-in-4.9.52.patch
#include <linux/errno.h>
typedef struct {
- spinlock_t lock;
cpumask_t cpu_attach_mask;
atomic_t flush_count;
unsigned int flush_mm;
} mm_context_t;
#define INIT_MM_CONTEXT(name) \
- .context.lock = __SPIN_LOCK_UNLOCKED(name.context.lock), \
+ .s390_flush_lock = __SPIN_LOCK_UNLOCKED(name.s390_flush_lock), \
.context.pgtable_lock = \
__SPIN_LOCK_UNLOCKED(name.context.pgtable_lock), \
.context.pgtable_list = LIST_HEAD_INIT(name.context.pgtable_list), \
static inline int init_new_context(struct task_struct *tsk,
struct mm_struct *mm)
{
- spin_lock_init(&mm->context.lock);
+ spin_lock_init(&mm->s390_flush_lock);
spin_lock_init(&mm->context.pgtable_lock);
INIT_LIST_HEAD(&mm->context.pgtable_list);
spin_lock_init(&mm->context.gmap_lock);
static inline void __tlb_flush_mm_lazy(struct mm_struct * mm)
{
- spin_lock(&mm->context.lock);
+ spin_lock(&mm->s390_flush_lock);
if (mm->context.flush_mm) {
mm->context.flush_mm = 0;
__tlb_flush_mm(mm);
}
- spin_unlock(&mm->context.lock);
+ spin_unlock(&mm->s390_flush_lock);
}
/*
atomic_long_t hugetlb_usage;
#endif
struct work_struct async_put_work;
+#ifndef __GENKSYMS__
+#ifdef CONFIG_S390
+ /* bwh: This should be in s390's mm_context_t but that breaks ABI */
+ spinlock_t s390_flush_lock;
+#endif
+#endif
};
static inline void mm_init_cpumask(struct mm_struct *mm)