19 #ifndef __ASM_MMU_CONTEXT_H
20 #define __ASM_MMU_CONTEXT_H
22 #include <linux/compiler.h>
23 #include <linux/sched.h>
25 #include <asm/cacheflush.h>
26 #include <asm/proc-fns.h>
28 #include <asm/cputype.h>
29 #include <asm/pgtable.h>
31 #define MAX_ASID_BITS 16
46 " msr ttbr0_el1, %0 // set TTBR0\n"
52 static inline void switch_new_context(
struct mm_struct *mm)
59 cpu_switch_mm(mm->
pgd, mm);
63 static inline void check_and_switch_context(
struct mm_struct *mm,
78 cpu_switch_mm(mm->
pgd, mm);
91 switch_new_context(mm);
94 #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0)
95 #define destroy_context(mm) do { } while(0)
97 #define finish_arch_post_lock_switch \
98 finish_arch_post_lock_switch
101 if (test_and_clear_thread_flag(TIF_SWITCH_MM)) {
108 cpu_switch_mm(mm->
pgd, mm);
141 if (!cpumask_empty(mm_cpumask(next)) &&
143 __flush_icache_all();
145 if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next)
146 check_and_switch_context(next, tsk);
149 #define deactivate_mm(tsk,mm) do { } while (0)
150 #define activate_mm(prev,next) switch_mm(prev, next, NULL)