• Home
  • Raw
  • Download

Lines Matching refs:id

109 static unsigned int steal_context_smp(unsigned int id)  in steal_context_smp()  argument
119 mm = context_mm[id]; in steal_context_smp()
125 id++; in steal_context_smp()
126 if (id > LAST_CONTEXT) in steal_context_smp()
127 id = FIRST_CONTEXT; in steal_context_smp()
130 pr_hardcont(" | steal %d from 0x%p", id, mm); in steal_context_smp()
133 mm->context.id = MMU_NO_CONTEXT; in steal_context_smp()
144 __set_bit(id, stale_map[i]); in steal_context_smp()
148 return id; in steal_context_smp()
169 unsigned int id; in steal_all_contexts() local
171 for (id = FIRST_CONTEXT; id <= LAST_CONTEXT; id++) { in steal_all_contexts()
173 mm = context_mm[id]; in steal_all_contexts()
175 pr_hardcont(" | steal %d from 0x%p", id, mm); in steal_all_contexts()
178 mm->context.id = MMU_NO_CONTEXT; in steal_all_contexts()
179 if (id != FIRST_CONTEXT) { in steal_all_contexts()
180 context_mm[id] = NULL; in steal_all_contexts()
181 __clear_bit(id, context_map); in steal_all_contexts()
187 __clear_bit(id, stale_map[cpu]); in steal_all_contexts()
204 static unsigned int steal_context_up(unsigned int id) in steal_context_up() argument
212 mm = context_mm[id]; in steal_context_up()
214 pr_hardcont(" | steal %d from 0x%p", id, mm); in steal_context_up()
220 mm->context.id = MMU_NO_CONTEXT; in steal_context_up()
224 __clear_bit(id, stale_map[cpu]); in steal_context_up()
227 return id; in steal_context_up()
233 unsigned int id, nrf, nact; in context_check_map() local
236 for (id = FIRST_CONTEXT; id <= LAST_CONTEXT; id++) { in context_check_map()
237 int used = test_bit(id, context_map); in context_check_map()
240 if (used != (context_mm[id] != NULL)) in context_check_map()
242 id, used ? "used" : "free", context_mm[id]); in context_check_map()
243 if (context_mm[id] != NULL) in context_check_map()
244 nact += context_mm[id]->context.active; in context_check_map()
264 unsigned int id; in switch_mmu_context() local
274 cpu, next, next->context.active, next->context.id); in switch_mmu_context()
289 id = next->context.id; in switch_mmu_context()
290 if (likely(id != MMU_NO_CONTEXT)) { in switch_mmu_context()
292 if (context_mm[id] != next) in switch_mmu_context()
294 next, id, id, context_mm[id]); in switch_mmu_context()
300 id = next_context; in switch_mmu_context()
301 if (id > LAST_CONTEXT) in switch_mmu_context()
302 id = FIRST_CONTEXT; in switch_mmu_context()
309 id = steal_context_smp(id); in switch_mmu_context()
310 if (id == MMU_NO_CONTEXT) in switch_mmu_context()
316 id = steal_all_contexts(); in switch_mmu_context()
318 id = steal_context_up(id); in switch_mmu_context()
324 while (__test_and_set_bit(id, map)) { in switch_mmu_context()
325 id = find_next_zero_bit(map, LAST_CONTEXT+1, id); in switch_mmu_context()
326 if (id > LAST_CONTEXT) in switch_mmu_context()
327 id = FIRST_CONTEXT; in switch_mmu_context()
330 next_context = id + 1; in switch_mmu_context()
331 context_mm[id] = next; in switch_mmu_context()
332 next->context.id = id; in switch_mmu_context()
333 pr_hardcont(" | new id=%d,nrf=%d", id, nr_free_contexts); in switch_mmu_context()
342 if (test_bit(id, stale_map[cpu])) { in switch_mmu_context()
344 id, cpu_first_thread_sibling(cpu), in switch_mmu_context()
353 __clear_bit(id, stale_map[i]); in switch_mmu_context()
359 pr_hardcont(" -> %d\n", id); in switch_mmu_context()
360 set_context(id, next->pgd); in switch_mmu_context()
378 if (mm->context.id == 0) in init_new_context()
380 mm->context.id = MMU_NO_CONTEXT; in init_new_context()
392 unsigned int id; in destroy_context() local
394 if (mm->context.id == MMU_NO_CONTEXT) in destroy_context()
400 id = mm->context.id; in destroy_context()
401 if (id != MMU_NO_CONTEXT) { in destroy_context()
402 __clear_bit(id, context_map); in destroy_context()
403 mm->context.id = MMU_NO_CONTEXT; in destroy_context()
407 context_mm[id] = NULL; in destroy_context()