#ifndef __ASM_ARM_MMU_CONTEXT_H
#define __ASM_ARM_MMU_CONTEXT_H
+#include <linux/compiler.h>
+#include <asm/cacheflush.h>
#include <asm/proc-fns.h>
#if __LINUX_ARM_ARCH__ >= 6
switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
+ unsigned int cpu = smp_processor_id();
+
if (prev != next) {
+ cpu_set(cpu, next->cpu_vm_mask);
check_context(next);
cpu_switch_mm(next->pgd, next);
+ if (cache_is_vivt())
+ cpu_clear(cpu, prev->cpu_vm_mask);
}
}
#define deactivate_mm(tsk,mm) do { } while (0)
-
-static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
-{
- check_context(next);
- cpu_switch_mm(next->pgd, next);
-}
+#define activate_mm(prev,next) switch_mm(prev, next, NULL)
#endif