aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-07-24 20:31:08 -0400
committerVineet Gupta <vgupta@synopsys.com>2013-08-30 12:12:19 -0400
commitc60115537c96d78a884d2a4bd78839a57266d48b (patch)
tree2ff332c464de8da643377e74609a47a371233248
parent3daa48d1d9bc44baa079d65e72ef2e3f1139ac03 (diff)
ARC: [ASID] activate_mm() == switch_mm()
ASID allocation changes/2 Use the fact that switch_mm() and activate_mm() are exactly same code now while acknowledging the semantical difference in comment Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/include/asm/mmu_context.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/arc/include/asm/mmu_context.h b/arch/arc/include/asm/mmu_context.h
index 7a3ecd25ffc9..9b09d18f01b3 100644
--- a/arch/arc/include/asm/mmu_context.h
+++ b/arch/arc/include/asm/mmu_context.h
@@ -156,6 +156,15 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
156 get_new_mmu_context(next); 156 get_new_mmu_context(next);
157} 157}
158 158
159/*
160 * Called at the time of execve() to get a new ASID
161 * Note the subtlety here: get_new_mmu_context() behaves differently here
162 * vs. in switch_mm(). Here it always returns a new ASID, because mm has
163 * an unallocated "initial" value, while in latter, it moves to a new ASID,
164 * only if it was unallocated
165 */
166#define activate_mm(prev, next) switch_mm(prev, next, NULL)
167
159static inline void destroy_context(struct mm_struct *mm) 168static inline void destroy_context(struct mm_struct *mm)
160{ 169{
161 unsigned long flags; 170 unsigned long flags;
@@ -177,17 +186,6 @@ static inline void destroy_context(struct mm_struct *mm)
177 */ 186 */
178#define deactivate_mm(tsk, mm) do { } while (0) 187#define deactivate_mm(tsk, mm) do { } while (0)
179 188
180static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
181{
182#ifndef CONFIG_SMP
183 write_aux_reg(ARC_REG_SCRATCH_DATA0, next->pgd);
184#endif
185
186 /* Unconditionally get a new ASID */
187 get_new_mmu_context(next);
188
189}
190
191#define enter_lazy_tlb(mm, tsk) 189#define enter_lazy_tlb(mm, tsk)
192 190
193#endif /* __ASM_ARC_MMU_CONTEXT_H */ 191#endif /* __ASM_ARC_MMU_CONTEXT_H */