diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-16 00:10:39 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-16 00:10:39 -0400 |
commit | 81f1adf01224f5c0be5f90f43664f799c1f7bb2d (patch) | |
tree | b38dbf1bc7e144a44ec38a6b1787fa870eac367f /arch/sparc/kernel/smp_64.c | |
parent | e9b375120b593d3081c2f63e8ccf350cccc8fd68 (diff) |
cpumask: use mm_cpumask() wrapper: sparc
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>
Diffstat (limited to 'arch/sparc/kernel/smp_64.c')
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 4e17eec41478..2de937c7232e 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -850,7 +850,7 @@ static void tsb_sync(void *info) | |||
850 | 850 | ||
851 | void smp_tsb_sync(struct mm_struct *mm) | 851 | void smp_tsb_sync(struct mm_struct *mm) |
852 | { | 852 | { |
853 | smp_call_function_many(&mm->cpu_vm_mask, tsb_sync, mm, 1); | 853 | smp_call_function_many(mm_cpumask(mm), tsb_sync, mm, 1); |
854 | } | 854 | } |
855 | 855 | ||
856 | extern unsigned long xcall_flush_tlb_mm; | 856 | extern unsigned long xcall_flush_tlb_mm; |
@@ -1055,13 +1055,13 @@ void smp_flush_tlb_mm(struct mm_struct *mm) | |||
1055 | int cpu = get_cpu(); | 1055 | int cpu = get_cpu(); |
1056 | 1056 | ||
1057 | if (atomic_read(&mm->mm_users) == 1) { | 1057 | if (atomic_read(&mm->mm_users) == 1) { |
1058 | mm->cpu_vm_mask = cpumask_of_cpu(cpu); | 1058 | cpumask_copy(mm_cpumask(mm), cpumask_of(cpu)); |
1059 | goto local_flush_and_out; | 1059 | goto local_flush_and_out; |
1060 | } | 1060 | } |
1061 | 1061 | ||
1062 | smp_cross_call_masked(&xcall_flush_tlb_mm, | 1062 | smp_cross_call_masked(&xcall_flush_tlb_mm, |
1063 | ctx, 0, 0, | 1063 | ctx, 0, 0, |
1064 | &mm->cpu_vm_mask); | 1064 | mm_cpumask(mm)); |
1065 | 1065 | ||
1066 | local_flush_and_out: | 1066 | local_flush_and_out: |
1067 | __flush_tlb_mm(ctx, SECONDARY_CONTEXT); | 1067 | __flush_tlb_mm(ctx, SECONDARY_CONTEXT); |
@@ -1075,11 +1075,11 @@ void smp_flush_tlb_pending(struct mm_struct *mm, unsigned long nr, unsigned long | |||
1075 | int cpu = get_cpu(); | 1075 | int cpu = get_cpu(); |
1076 | 1076 | ||
1077 | if (mm == current->active_mm && atomic_read(&mm->mm_users) == 1) | 1077 | if (mm == current->active_mm && atomic_read(&mm->mm_users) == 1) |
1078 | mm->cpu_vm_mask = cpumask_of_cpu(cpu); | 1078 | cpumask_copy(mm_cpumask(mm), cpumask_of(cpu)); |
1079 | else | 1079 | else |
1080 | smp_cross_call_masked(&xcall_flush_tlb_pending, | 1080 | smp_cross_call_masked(&xcall_flush_tlb_pending, |
1081 | ctx, nr, (unsigned long) vaddrs, | 1081 | ctx, nr, (unsigned long) vaddrs, |
1082 | &mm->cpu_vm_mask); | 1082 | mm_cpumask(mm)); |
1083 | 1083 | ||
1084 | __flush_tlb_pending(ctx, nr, vaddrs); | 1084 | __flush_tlb_pending(ctx, nr, vaddrs); |
1085 | 1085 | ||