|
@@ -215,14 +215,25 @@ static inline void memalloc_noreclaim_restore(unsigned int flags)
|
|
|
#ifdef CONFIG_MEMBARRIER
|
|
|
enum {
|
|
|
MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY = (1U << 0),
|
|
|
- MEMBARRIER_STATE_SWITCH_MM = (1U << 1),
|
|
|
+ MEMBARRIER_STATE_PRIVATE_EXPEDITED = (1U << 1),
|
|
|
};
|
|
|
|
|
|
+#ifdef CONFIG_ARCH_HAS_MEMBARRIER_CALLBACKS
|
|
|
+#include <asm/membarrier.h>
|
|
|
+#endif
|
|
|
+
|
|
|
static inline void membarrier_execve(struct task_struct *t)
|
|
|
{
|
|
|
atomic_set(&t->mm->membarrier_state, 0);
|
|
|
}
|
|
|
#else
|
|
|
+#ifdef CONFIG_ARCH_HAS_MEMBARRIER_CALLBACKS
|
|
|
+static inline void membarrier_arch_switch_mm(struct mm_struct *prev,
|
|
|
+ struct mm_struct *next,
|
|
|
+ struct task_struct *tsk)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif
|
|
|
static inline void membarrier_execve(struct task_struct *t)
|
|
|
{
|
|
|
}
|