diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-09-24 11:34:49 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-09-23 20:04:49 -0400 |
commit | 56f8ba83a52b9f9e3711eff8e54168ac14aa288f (patch) | |
tree | e030f7f3a191384268d86863ca43237a137e8f51 /arch/arm/include/asm/cacheflush.h | |
parent | a6a01063de6298c60f2506dc7659403e02b4b224 (diff) |
cpumask: use mm_cpumask() wrapper: arm
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/arm/include/asm/cacheflush.h')
-rw-r--r-- | arch/arm/include/asm/cacheflush.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 1a711ea8418b..fd03fb63a332 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -334,14 +334,14 @@ static inline void outer_flush_range(unsigned long start, unsigned long end) | |||
334 | #ifndef CONFIG_CPU_CACHE_VIPT | 334 | #ifndef CONFIG_CPU_CACHE_VIPT |
335 | static inline void flush_cache_mm(struct mm_struct *mm) | 335 | static inline void flush_cache_mm(struct mm_struct *mm) |
336 | { | 336 | { |
337 | if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) | 337 | if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(mm))) |
338 | __cpuc_flush_user_all(); | 338 | __cpuc_flush_user_all(); |
339 | } | 339 | } |
340 | 340 | ||
341 | static inline void | 341 | static inline void |
342 | flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) | 342 | flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) |
343 | { | 343 | { |
344 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) | 344 | if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) |
345 | __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end), | 345 | __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end), |
346 | vma->vm_flags); | 346 | vma->vm_flags); |
347 | } | 347 | } |
@@ -349,7 +349,7 @@ flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long | |||
349 | static inline void | 349 | static inline void |
350 | flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) | 350 | flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn) |
351 | { | 351 | { |
352 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { | 352 | if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { |
353 | unsigned long addr = user_addr & PAGE_MASK; | 353 | unsigned long addr = user_addr & PAGE_MASK; |
354 | __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); | 354 | __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); |
355 | } | 355 | } |
@@ -360,7 +360,7 @@ flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | |||
360 | unsigned long uaddr, void *kaddr, | 360 | unsigned long uaddr, void *kaddr, |
361 | unsigned long len, int write) | 361 | unsigned long len, int write) |
362 | { | 362 | { |
363 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { | 363 | if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { |
364 | unsigned long addr = (unsigned long)kaddr; | 364 | unsigned long addr = (unsigned long)kaddr; |
365 | __cpuc_coherent_kern_range(addr, addr + len); | 365 | __cpuc_coherent_kern_range(addr, addr + len); |
366 | } | 366 | } |