aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/context.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
index 06a2e7ce23c3..806cc4f63516 100644
--- a/arch/arm/mm/context.c
+++ b/arch/arm/mm/context.c
@@ -18,9 +18,6 @@
18 18
19static DEFINE_RAW_SPINLOCK(cpu_asid_lock); 19static DEFINE_RAW_SPINLOCK(cpu_asid_lock);
20unsigned int cpu_last_asid = ASID_FIRST_VERSION; 20unsigned int cpu_last_asid = ASID_FIRST_VERSION;
21#ifdef CONFIG_SMP
22DEFINE_PER_CPU(struct mm_struct *, current_mm);
23#endif
24 21
25#ifdef CONFIG_ARM_LPAE 22#ifdef CONFIG_ARM_LPAE
26void cpu_set_reserved_ttbr0(void) 23void cpu_set_reserved_ttbr0(void)
@@ -108,14 +105,7 @@ static void reset_context(void *info)
108{ 105{
109 unsigned int asid; 106 unsigned int asid;
110 unsigned int cpu = smp_processor_id(); 107 unsigned int cpu = smp_processor_id();
111 struct mm_struct *mm = per_cpu(current_mm, cpu); 108 struct mm_struct *mm = current->active_mm;
112
113 /*
114 * Check if a current_mm was set on this CPU as it might still
115 * be in the early booting stages and using the reserved ASID.
116 */
117 if (!mm)
118 return;
119 109
120 smp_rmb(); 110 smp_rmb();
121 asid = cpu_last_asid + cpu + 1; 111 asid = cpu_last_asid + cpu + 1;