diff options
author | Will Deacon <will.deacon@arm.com> | 2011-05-26 06:24:25 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-26 07:14:33 -0400 |
commit | 45b95235b0ac86cef2ad4480b0618b8778847479 (patch) | |
tree | e3c4de8439787133504306362fc7dac3947b456e /arch/arm/mm | |
parent | 52af9c6cd863fe37d1103035ec7ee22ac1296458 (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>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/context.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index 0d86298c7279..8bfae964b133 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); |