diff options
author | Will Deacon <will.deacon@arm.com> | 2011-05-26 11:24:25 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2012-05-21 12:51:22 +0100 |
commit | 35d5dcd371217884374a2be9af99b659f9366479 (patch) | |
tree | 91c585eb0d7fa132d74b8f56fec345f9ea6a20ab | |
parent | 5a34ac3cf18e9a88e080f0b3cfa4b20c51aa7db1 (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 97842a09a6e..efa413ad3bc 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); |