x86-64: Move TLB state from PDA to per-cpu and consolidate with 32-bit.
Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@@ -148,20 +148,17 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
|
||||
#define TLBSTATE_OK 1
|
||||
#define TLBSTATE_LAZY 2
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
struct tlb_state {
|
||||
struct mm_struct *active_mm;
|
||||
int state;
|
||||
char __cacheline_padding[L1_CACHE_BYTES-8];
|
||||
};
|
||||
DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate);
|
||||
|
||||
void reset_lazy_tlbstate(void);
|
||||
#else
|
||||
static inline void reset_lazy_tlbstate(void)
|
||||
{
|
||||
percpu_write(cpu_tlbstate.state, 0);
|
||||
percpu_write(cpu_tlbstate.active_mm, &init_mm);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SMP */
|
||||
|
||||
|
Reference in New Issue
Block a user