Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpumask: deprecate cpumask_next_wrap()

The next patch aligns implementation of cpumask_next_wrap() with the
find_next_bit_wrap(), and it changes function signature.

To make the transition smooth, this patch deprecates current
implementation by adding an _old suffix. The following patches switch
current users to the new implementation one by one.

No functional changes were intended.

Signed-off-by: Yury Norov <yury.norov@gmail.com>

+9 -9
+1 -1
arch/s390/kernel/processor.c
··· 72 72 this_cpu = smp_processor_id(); 73 73 if (__this_cpu_inc_return(cpu_relax_retry) >= spin_retry) { 74 74 __this_cpu_write(cpu_relax_retry, 0); 75 - cpu = cpumask_next_wrap(this_cpu, cpumask, this_cpu, false); 75 + cpu = cpumask_next_wrap_old(this_cpu, cpumask, this_cpu, false); 76 76 if (cpu >= nr_cpu_ids) 77 77 return; 78 78 if (arch_vcpu_is_preempted(cpu))
+1 -1
drivers/pci/controller/pci-hyperv.c
··· 1757 1757 1758 1758 spin_lock_irqsave(&multi_msi_cpu_lock, flags); 1759 1759 1760 - cpu_next = cpumask_next_wrap(cpu_next, cpu_online_mask, nr_cpu_ids, 1760 + cpu_next = cpumask_next_wrap_old(cpu_next, cpu_online_mask, nr_cpu_ids, 1761 1761 false); 1762 1762 cpu = cpu_next; 1763 1763
+1 -1
drivers/scsi/lpfc/lpfc_init.c
··· 12873 12873 12874 12874 if (offline) { 12875 12875 /* Find next online CPU on original mask */ 12876 - cpu_next = cpumask_next_wrap(cpu, orig_mask, cpu, true); 12876 + cpu_next = cpumask_next_wrap_old(cpu, orig_mask, cpu, true); 12877 12877 cpu_select = lpfc_next_online_cpu(orig_mask, cpu_next); 12878 12878 12879 12879 /* Found a valid CPU */
+2 -2
include/linux/cpumask.h
··· 296 296 297 297 #if NR_CPUS == 1 298 298 static __always_inline 299 - unsigned int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap) 299 + unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap) 300 300 { 301 301 cpumask_check(start); 302 302 if (n != -1) ··· 312 312 return cpumask_first(mask); 313 313 } 314 314 #else 315 - unsigned int __pure cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap); 315 + unsigned int __pure cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap); 316 316 #endif 317 317 318 318 /**
+1 -1
kernel/padata.c
··· 290 290 if (remove_object) { 291 291 list_del_init(&padata->list); 292 292 ++pd->processed; 293 - pd->cpu = cpumask_next_wrap(cpu, pd->cpumask.pcpu, -1, false); 293 + pd->cpu = cpumask_next_wrap_old(cpu, pd->cpumask.pcpu, -1, false); 294 294 } 295 295 296 296 spin_unlock(&reorder->lock);
+3 -3
lib/cpumask.c
··· 8 8 #include <linux/numa.h> 9 9 10 10 /** 11 - * cpumask_next_wrap - helper to implement for_each_cpu_wrap 11 + * cpumask_next_wrap_old - helper to implement for_each_cpu_wrap 12 12 * @n: the cpu prior to the place to search 13 13 * @mask: the cpumask pointer 14 14 * @start: the start point of the iteration ··· 19 19 * Note: the @wrap argument is required for the start condition when 20 20 * we cannot assume @start is set in @mask. 21 21 */ 22 - unsigned int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap) 22 + unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap) 23 23 { 24 24 unsigned int next; 25 25 ··· 37 37 38 38 return next; 39 39 } 40 - EXPORT_SYMBOL(cpumask_next_wrap); 40 + EXPORT_SYMBOL(cpumask_next_wrap_old); 41 41 42 42 /* These are not inline because of header tangles. */ 43 43 #ifdef CONFIG_CPUMASK_OFFSTACK