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/include | |
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/include')
-rw-r--r-- | arch/sparc/include/asm/mmu_context_64.h | 8 | ||||
-rw-r--r-- | arch/sparc/include/asm/system_32.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h index 5693ab482606..666a73fef28d 100644 --- a/arch/sparc/include/asm/mmu_context_64.h +++ b/arch/sparc/include/asm/mmu_context_64.h | |||
@@ -121,8 +121,8 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str | |||
121 | * local TLB. | 121 | * local TLB. |
122 | */ | 122 | */ |
123 | cpu = smp_processor_id(); | 123 | cpu = smp_processor_id(); |
124 | if (!ctx_valid || !cpu_isset(cpu, mm->cpu_vm_mask)) { | 124 | if (!ctx_valid || !cpumask_test_cpu(cpu, mm_cpumask(mm))) { |
125 | cpu_set(cpu, mm->cpu_vm_mask); | 125 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
126 | __flush_tlb_mm(CTX_HWBITS(mm->context), | 126 | __flush_tlb_mm(CTX_HWBITS(mm->context), |
127 | SECONDARY_CONTEXT); | 127 | SECONDARY_CONTEXT); |
128 | } | 128 | } |
@@ -141,8 +141,8 @@ static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm | |||
141 | if (!CTX_VALID(mm->context)) | 141 | if (!CTX_VALID(mm->context)) |
142 | get_new_mmu_context(mm); | 142 | get_new_mmu_context(mm); |
143 | cpu = smp_processor_id(); | 143 | cpu = smp_processor_id(); |
144 | if (!cpu_isset(cpu, mm->cpu_vm_mask)) | 144 | if (!cpumask_test_cpu(cpu, mm_cpumask(mm))) |
145 | cpu_set(cpu, mm->cpu_vm_mask); | 145 | cpumask_set_cpu(cpu, mm_cpumask(mm)); |
146 | 146 | ||
147 | load_secondary_context(mm); | 147 | load_secondary_context(mm); |
148 | __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT); | 148 | __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT); |
diff --git a/arch/sparc/include/asm/system_32.h b/arch/sparc/include/asm/system_32.h index 79c1ae2b42a3..751c8c17f5a0 100644 --- a/arch/sparc/include/asm/system_32.h +++ b/arch/sparc/include/asm/system_32.h | |||
@@ -126,7 +126,7 @@ extern void flushw_all(void); | |||
126 | #define switch_to(prev, next, last) do { \ | 126 | #define switch_to(prev, next, last) do { \ |
127 | SWITCH_ENTER(prev); \ | 127 | SWITCH_ENTER(prev); \ |
128 | SWITCH_DO_LAZY_FPU(next); \ | 128 | SWITCH_DO_LAZY_FPU(next); \ |
129 | cpu_set(smp_processor_id(), next->active_mm->cpu_vm_mask); \ | 129 | cpumask_set_cpu(smp_processor_id(), mm_cpumask(next->active_mm)); \ |
130 | __asm__ __volatile__( \ | 130 | __asm__ __volatile__( \ |
131 | "sethi %%hi(here - 0x8), %%o7\n\t" \ | 131 | "sethi %%hi(here - 0x8), %%o7\n\t" \ |
132 | "mov %%g6, %%g3\n\t" \ | 132 | "mov %%g6, %%g3\n\t" \ |