Lines Matching refs:cpu

79 static unsigned long asid_version_mask(unsigned int cpu)  in asid_version_mask()  argument
81 unsigned long asid_mask = cpu_asid_mask(&cpu_data[cpu]); in asid_version_mask()
86 static unsigned long asid_first_version(unsigned int cpu) in asid_first_version() argument
88 return ~asid_version_mask(cpu) + 1; in asid_first_version()
91 #define cpu_context(cpu, mm) ((mm)->context.asid[cpu]) argument
92 #define asid_cache(cpu) (cpu_data[cpu].asid_cache) argument
93 #define cpu_asid(cpu, mm) \ argument
94 (cpu_context((cpu), (mm)) & cpu_asid_mask(&cpu_data[cpu]))
103 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()
107 if (!((asid += cpu_asid_inc()) & cpu_asid_mask(&cpu_data[cpu]))) { in get_new_mmu_context()
112 asid = asid_first_version(cpu); in get_new_mmu_context()
115 cpu_context(cpu, mm) = asid_cache(cpu) = asid; in get_new_mmu_context()
140 unsigned int cpu = smp_processor_id(); in switch_mm() local
146 if ((cpu_context(cpu, next) ^ asid_cache(cpu)) & asid_version_mask(cpu)) in switch_mm()
147 get_new_mmu_context(next, cpu); in switch_mm()
148 write_c0_entryhi(cpu_asid(cpu, next)); in switch_mm()
155 cpumask_clear_cpu(cpu, mm_cpumask(prev)); in switch_mm()
156 cpumask_set_cpu(cpu, mm_cpumask(next)); in switch_mm()
181 unsigned int cpu = smp_processor_id(); in activate_mm() local
187 get_new_mmu_context(next, cpu); in activate_mm()
189 write_c0_entryhi(cpu_asid(cpu, next)); in activate_mm()
193 cpumask_clear_cpu(cpu, mm_cpumask(prev)); in activate_mm()
194 cpumask_set_cpu(cpu, mm_cpumask(next)); in activate_mm()
205 drop_mmu_context(struct mm_struct *mm, unsigned cpu) in drop_mmu_context() argument
212 if (cpumask_test_cpu(cpu, mm_cpumask(mm))) { in drop_mmu_context()
213 get_new_mmu_context(mm, cpu); in drop_mmu_context()
214 write_c0_entryhi(cpu_asid(cpu, mm)); in drop_mmu_context()
217 cpu_context(cpu, mm) = 0; in drop_mmu_context()