Lines Matching refs:cpu
34 #define cpu_asid_cache(cpu) per_cpu(asid_cache, cpu) argument
68 static inline void get_new_mmu_context(struct mm_struct *mm, unsigned int cpu) in get_new_mmu_context() argument
70 unsigned long asid = cpu_asid_cache(cpu); in get_new_mmu_context()
79 cpu_asid_cache(cpu) = asid; in get_new_mmu_context()
80 mm->context.asid[cpu] = asid; in get_new_mmu_context()
81 mm->context.cpu = cpu; in get_new_mmu_context()
84 static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu) in get_mmu_context() argument
91 unsigned long asid = mm->context.asid[cpu]; in get_mmu_context()
94 ((asid ^ cpu_asid_cache(cpu)) & ~ASID_MASK)) in get_mmu_context()
95 get_new_mmu_context(mm, cpu); in get_mmu_context()
99 static inline void activate_context(struct mm_struct *mm, unsigned int cpu) in activate_context() argument
101 get_mmu_context(mm, cpu); in activate_context()
102 set_rasid_register(ASID_INSERT(mm->context.asid[cpu])); in activate_context()
115 int cpu; in init_new_context() local
116 for_each_possible_cpu(cpu) { in init_new_context()
117 mm->context.asid[cpu] = NO_CONTEXT; in init_new_context()
119 mm->context.cpu = -1; in init_new_context()
126 unsigned int cpu = smp_processor_id(); in switch_mm() local
127 int migrated = next->context.cpu != cpu; in switch_mm()
131 next->context.cpu = cpu; in switch_mm()
134 activate_context(next, cpu); in switch_mm()