]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
cpumask: use mm_cpumask() wrapper: m32r
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 15:34:49 +0000 (09:34 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Sep 2009 00:04:50 +0000 (09:34 +0930)
Makes code futureproof against the impending change to mm->cpu_vm_mask.

It's also a chance to use the new cpumask_ ops which take a pointer
(the older ones are deprecated, but there's no hurry for arch code).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Hirokazu Takata <takata@linux-m32r.org> (fixes)
arch/m32r/include/asm/mmu_context.h
arch/m32r/kernel/smp.c

index 91909e5dd9d0a300b5a32ddb4e930c7bbae21066..a70a3df33635f96844fe34c75721336d8cc2fbc0 100644 (file)
@@ -127,7 +127,7 @@ static inline void switch_mm(struct mm_struct *prev,
 
        if (prev != next) {
 #ifdef CONFIG_SMP
-               cpu_set(cpu, next->cpu_vm_mask);
+               cpumask_set_cpu(cpu, mm_cpumask(next));
 #endif /* CONFIG_SMP */
                /* Set MPTB = next->pgd */
                *(volatile unsigned long *)MPTB = (unsigned long)next->pgd;
@@ -135,7 +135,7 @@ static inline void switch_mm(struct mm_struct *prev,
        }
 #ifdef CONFIG_SMP
        else
-               if (!cpu_test_and_set(cpu, next->cpu_vm_mask))
+               if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)))
                        activate_context(next);
 #endif /* CONFIG_SMP */
 }
index 45c512bcd4cace635e22869f1b03d2931db68c39..1b7598e6f6e815fd2129146a9925cedac2495573 100644 (file)
@@ -264,7 +264,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
        preempt_disable();
        cpu_id = smp_processor_id();
        mmc = &mm->context[cpu_id];
-       cpu_mask = mm->cpu_vm_mask;
+       cpu_mask = *mm_cpumask(mm);
        cpu_clear(cpu_id, cpu_mask);
 
        if (*mmc != NO_CONTEXT) {
@@ -273,7 +273,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)
                if (mm == current->mm)
                        activate_context(mm);
                else
-                       cpu_clear(cpu_id, mm->cpu_vm_mask);
+                       cpumask_clear_cpu(cpu_id, mm_cpumask(mm));
                local_irq_restore(flags);
        }
        if (!cpus_empty(cpu_mask))
@@ -334,7 +334,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
        preempt_disable();
        cpu_id = smp_processor_id();
        mmc = &mm->context[cpu_id];
-       cpu_mask = mm->cpu_vm_mask;
+       cpu_mask = *mm_cpumask(mm);
        cpu_clear(cpu_id, cpu_mask);
 
 #ifdef DEBUG_SMP
@@ -469,7 +469,7 @@ void smp_invalidate_interrupt(void)
                if (flush_mm == current->active_mm)
                        activate_context(flush_mm);
                else
-                       cpu_clear(cpu_id, flush_mm->cpu_vm_mask);
+                       cpumask_clear_cpu(cpu_id, mm_cpumask(flush_mm));
        } else {
                unsigned long va = flush_va;