Lines Matching refs:cpu
35 #define cpu_asid_cache(cpu) per_cpu(asid_cache, cpu) argument
70 static inline void get_new_mmu_context(struct mm_struct *mm, unsigned int cpu) in get_new_mmu_context() argument
72 unsigned long asid = cpu_asid_cache(cpu); in get_new_mmu_context()
81 cpu_asid_cache(cpu) = asid; in get_new_mmu_context()
82 mm->context.asid[cpu] = asid; in get_new_mmu_context()
83 mm->context.cpu = cpu; in get_new_mmu_context()
86 static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu) in get_mmu_context() argument
93 unsigned long asid = mm->context.asid[cpu]; in get_mmu_context()
96 ((asid ^ cpu_asid_cache(cpu)) & ~ASID_MASK)) in get_mmu_context()
97 get_new_mmu_context(mm, cpu); in get_mmu_context()
101 static inline void activate_context(struct mm_struct *mm, unsigned int cpu) in activate_context() argument
103 get_mmu_context(mm, cpu); in activate_context()
104 set_rasid_register(ASID_INSERT(mm->context.asid[cpu])); in activate_context()
118 int cpu; in init_new_context() local
119 for_each_possible_cpu(cpu) { in init_new_context()
120 mm->context.asid[cpu] = NO_CONTEXT; in init_new_context()
122 mm->context.cpu = -1; in init_new_context()
129 unsigned int cpu = smp_processor_id(); in switch_mm() local
130 int migrated = next->context.cpu != cpu; in switch_mm()
134 next->context.cpu = cpu; in switch_mm()
137 activate_context(next, cpu); in switch_mm()