|
@@ -25,8 +25,8 @@ void destroy_context(struct mm_struct *mm);
|
|
|
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
|
|
|
{
|
|
|
#ifdef CONFIG_SMP
|
|
|
- if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
|
|
|
- percpu_write(cpu_tlbstate.state, TLBSTATE_LAZY);
|
|
|
+ if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
|
|
|
+ this_cpu_write(cpu_tlbstate.state, TLBSTATE_LAZY);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -37,8 +37,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|
|
|
|
|
if (likely(prev != next)) {
|
|
|
#ifdef CONFIG_SMP
|
|
|
- percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
|
|
|
- percpu_write(cpu_tlbstate.active_mm, next);
|
|
|
+ this_cpu_write(cpu_tlbstate.state, TLBSTATE_OK);
|
|
|
+ this_cpu_write(cpu_tlbstate.active_mm, next);
|
|
|
#endif
|
|
|
cpumask_set_cpu(cpu, mm_cpumask(next));
|
|
|
|
|
@@ -56,8 +56,8 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|
|
}
|
|
|
#ifdef CONFIG_SMP
|
|
|
else {
|
|
|
- percpu_write(cpu_tlbstate.state, TLBSTATE_OK);
|
|
|
- BUG_ON(percpu_read(cpu_tlbstate.active_mm) != next);
|
|
|
+ this_cpu_write(cpu_tlbstate.state, TLBSTATE_OK);
|
|
|
+ BUG_ON(this_cpu_read(cpu_tlbstate.active_mm) != next);
|
|
|
|
|
|
if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next))) {
|
|
|
/* We were in lazy tlb mode and leave_mm disabled
|