Lines Matching +full:reserved +full:- +full:cpu +full:- +full:vectors
8 * Copyright (C) 2001 - 2013 Tensilica Inc.
23 #include <asm/vectors.h>
27 #include <asm-generic/mm_hooks.h>
28 #include <asm-generic/percpu.h>
35 #define cpu_asid_cache(cpu) per_cpu(asid_cache, cpu) argument
39 * any user or kernel context. We use the reserved values in the
44 * 2 reserved
45 * 3 reserved
51 #define ASID_MASK ((1 << XCHAL_MMU_ASID_BITS) - 1)
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()
110 * instance. Valid cpu values are 0..(NR_CPUS-1), so initializing
111 * to -1 says the process has never run on any core.
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()
151 #include <asm-generic/mmu_context.h>