aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2011-05-26 06:24:25 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-05-26 07:14:33 -0400
commit45b95235b0ac86cef2ad4480b0618b8778847479 (patch)
treee3c4de8439787133504306362fc7dac3947b456e
parent52af9c6cd863fe37d1103035ec7ee22ac1296458 (diff)
ARM: 6944/1: mm: allow ASID 0 to be allocated to tasks
Now that ASID 0 is no longer used as a reserved value, allow it to be allocated to tasks. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mm/context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
index 0d86298c727..8bfae964b13 100644
--- a/arch/arm/mm/context.c
+++ b/arch/arm/mm/context.c
@@ -94,7 +94,7 @@ static void reset_context(void *info)
94 return; 94 return;
95 95
96 smp_rmb(); 96 smp_rmb();
97 asid = cpu_last_asid + cpu + 1; 97 asid = cpu_last_asid + cpu;
98 98
99 flush_context(); 99 flush_context();
100 set_mm_context(mm, asid); 100 set_mm_context(mm, asid);
@@ -144,13 +144,13 @@ void __new_context(struct mm_struct *mm)
144 * to start a new version and flush the TLB. 144 * to start a new version and flush the TLB.
145 */ 145 */
146 if (unlikely((asid & ~ASID_MASK) == 0)) { 146 if (unlikely((asid & ~ASID_MASK) == 0)) {
147 asid = cpu_last_asid + smp_processor_id() + 1; 147 asid = cpu_last_asid + smp_processor_id();
148 flush_context(); 148 flush_context();
149#ifdef CONFIG_SMP 149#ifdef CONFIG_SMP
150 smp_wmb(); 150 smp_wmb();
151 smp_call_function(reset_context, NULL, 1); 151 smp_call_function(reset_context, NULL, 1);
152#endif 152#endif
153 cpu_last_asid += NR_CPUS; 153 cpu_last_asid += NR_CPUS - 1;
154 } 154 }
155 155
156 set_mm_context(mm, asid); 156 set_mm_context(mm, asid);