mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 12:26:45 +07:00
28c22d7dc9
init_mm used at kernel/sched.c:idle_task_exit() has spin_lock (init_mm.context.id_lock) that is not initialized when spin_lock/unlock is called at an ARM machine. Note that mm_struct.context.id_lock is usually initialized except for the instance of init_mm at linux/arch/arm/mm/context.c Not initializing this spinlock incurs "BUG: pinlock bad magic" warning when spinlock debug is enabled. We have observed such instances when testing PM in S5PC210 machines. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
38 lines
724 B
C
38 lines
724 B
C
#ifndef __ARM_MMU_H
|
|
#define __ARM_MMU_H
|
|
|
|
#ifdef CONFIG_MMU
|
|
|
|
typedef struct {
|
|
#ifdef CONFIG_CPU_HAS_ASID
|
|
unsigned int id;
|
|
spinlock_t id_lock;
|
|
#endif
|
|
unsigned int kvm_seq;
|
|
} mm_context_t;
|
|
|
|
#ifdef CONFIG_CPU_HAS_ASID
|
|
#define ASID(mm) ((mm)->context.id & 255)
|
|
|
|
/* init_mm.context.id_lock should be initialized. */
|
|
#define INIT_MM_CONTEXT(name) \
|
|
.context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock),
|
|
#else
|
|
#define ASID(mm) (0)
|
|
#endif
|
|
|
|
#else
|
|
|
|
/*
|
|
* From nommu.h:
|
|
* Copyright (C) 2002, David McCullough <davidm@snapgear.com>
|
|
* modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com>
|
|
*/
|
|
typedef struct {
|
|
unsigned long end_brk;
|
|
} mm_context_t;
|
|
|
|
#endif
|
|
|
|
#endif
|