21 #include <linux/sched.h>
26 #include <asm/mmu_context.h>
27 #include <asm/tlbflush.h>
28 #include <asm/cachetype.h>
30 #define asid_bits(reg) \
31 (((read_cpuid(ID_AA64MMFR0_EL1) & 0xf0) >> 2) + 8)
33 #define ASID_FIRST_VERSION (1 << MAX_ASID_BITS)
47 static void flush_context(
void)
52 if (icache_is_aivivt())
58 static void set_mm_context(
struct mm_struct *mm,
unsigned int asid)
75 cpumask_clear(mm_cpumask(mm));
89 static void reset_context(
void *
info)
99 set_mm_context(mm, asid);
102 cpu_switch_mm(mm->
pgd, mm);
107 static inline void set_mm_context(
struct mm_struct *mm,
unsigned int asid)
143 if (
unlikely((asid & ((1 << bits) - 1)) == 0)) {
157 set_mm_context(mm, asid);