diff options
author | Will Deacon <will.deacon@arm.com> | 2011-05-26 11:24:25 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2012-04-17 19:48:03 +0100 |
commit | 56da8738f1e758a4f00163fed8298b409c6b8011 (patch) | |
tree | cabc3449481655c306621a8ae7c9b52c4ef50de9 | |
parent | bd7ebc4a136d024c0ed865413a6726a9760249f4 (diff) |
ARM: 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.
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Marc Zyngier <Marc.Zyngier@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-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 97842a09a6eb..efa413ad3bc1 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c @@ -118,7 +118,7 @@ static void reset_context(void *info) return; smp_rmb(); - asid = cpu_last_asid + cpu + 1; + asid = cpu_last_asid + cpu; flush_context(); set_mm_context(mm, asid); @@ -167,13 +167,13 @@ void __new_context(struct mm_struct *mm) * to start a new version and flush the TLB. */ if (unlikely((asid & ~ASID_MASK) == 0)) { - asid = cpu_last_asid + smp_processor_id() + 1; + asid = cpu_last_asid + smp_processor_id(); flush_context(); #ifdef CONFIG_SMP smp_wmb(); smp_call_function(reset_context, NULL, 1); #endif - cpu_last_asid += NR_CPUS; + cpu_last_asid += NR_CPUS - 1; } set_mm_context(mm, asid); |