ARM: 6944/1: mm: allow ASID 0 to be allocated to tasks
[pandora-kernel.git] / arch / arm / mm / context.c
index 0d86298..8bfae96 100644 (file)
@@ -94,7 +94,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);
@@ -144,13 +144,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);