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>
This commit is contained in:
parent
3daa48d1d9
commit
c60115537c
|
@ -156,6 +156,15 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
||||||
get_new_mmu_context(next);
|
get_new_mmu_context(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called at the time of execve() to get a new ASID
|
||||||
|
* Note the subtlety here: get_new_mmu_context() behaves differently here
|
||||||
|
* vs. in switch_mm(). Here it always returns a new ASID, because mm has
|
||||||
|
* an unallocated "initial" value, while in latter, it moves to a new ASID,
|
||||||
|
* only if it was unallocated
|
||||||
|
*/
|
||||||
|
#define activate_mm(prev, next) switch_mm(prev, next, NULL)
|
||||||
|
|
||||||
static inline void destroy_context(struct mm_struct *mm)
|
static inline void destroy_context(struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -177,17 +186,6 @@ static inline void destroy_context(struct mm_struct *mm)
|
||||||
*/
|
*/
|
||||||
#define deactivate_mm(tsk, mm) do { } while (0)
|
#define deactivate_mm(tsk, mm) do { } while (0)
|
||||||
|
|
||||||
static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
|
|
||||||
{
|
|
||||||
#ifndef CONFIG_SMP
|
|
||||||
write_aux_reg(ARC_REG_SCRATCH_DATA0, next->pgd);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Unconditionally get a new ASID */
|
|
||||||
get_new_mmu_context(next);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#define enter_lazy_tlb(mm, tsk)
|
#define enter_lazy_tlb(mm, tsk)
|
||||||
|
|
||||||
#endif /* __ASM_ARC_MMU_CONTEXT_H */
|
#endif /* __ASM_ARC_MMU_CONTEXT_H */
|
||||||
|
|
Loading…
Reference in New Issue