Lines Matching refs:cpu
85 #define cpu_context(cpu, mm) ((mm)->context.asid[cpu]) argument
86 #define cpu_asid(cpu, mm) (cpu_context((cpu), (mm)) & ASID_MASK) argument
87 #define asid_cache(cpu) (cpu_data[cpu].asid_cache) argument
102 get_new_mmu_context(struct mm_struct *mm, unsigned long cpu) in get_new_mmu_context() argument
105 unsigned long asid = asid_cache(cpu); in get_new_mmu_context()
119 cpu_context(cpu, mm) = asid_cache(cpu) = asid; in get_new_mmu_context()
142 unsigned int cpu = smp_processor_id(); in switch_mm() local
148 if ((cpu_context(cpu, next) ^ asid_cache(cpu)) & ASID_VERSION_MASK) in switch_mm()
149 get_new_mmu_context(next, cpu); in switch_mm()
150 write_c0_entryhi(cpu_asid(cpu, next)); in switch_mm()
157 cpumask_clear_cpu(cpu, mm_cpumask(prev)); in switch_mm()
158 cpumask_set_cpu(cpu, mm_cpumask(next)); in switch_mm()
182 unsigned int cpu = smp_processor_id(); in activate_mm() local
188 get_new_mmu_context(next, cpu); in activate_mm()
190 write_c0_entryhi(cpu_asid(cpu, next)); in activate_mm()
194 cpumask_clear_cpu(cpu, mm_cpumask(prev)); in activate_mm()
195 cpumask_set_cpu(cpu, mm_cpumask(next)); in activate_mm()
206 drop_mmu_context(struct mm_struct *mm, unsigned cpu) in drop_mmu_context() argument
213 if (cpumask_test_cpu(cpu, mm_cpumask(mm))) { in drop_mmu_context()
214 get_new_mmu_context(mm, cpu); in drop_mmu_context()
215 write_c0_entryhi(cpu_asid(cpu, mm)); in drop_mmu_context()
218 cpu_context(cpu, mm) = 0; in drop_mmu_context()