diff options
-rw-r--r-- | include/linux/cpumask.h | 3 | ||||
-rw-r--r-- | lib/cpumask.c | 12 |
2 files changed, 1 insertions, 14 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 7b9b75a529be..1ffdb9856bb9 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -810,11 +810,10 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu) | |||
810 | #else /* NR_CPUS > 1 */ | 810 | #else /* NR_CPUS > 1 */ |
811 | int __first_cpu(const cpumask_t *srcp); | 811 | int __first_cpu(const cpumask_t *srcp); |
812 | int __next_cpu(int n, const cpumask_t *srcp); | 812 | int __next_cpu(int n, const cpumask_t *srcp); |
813 | int __any_online_cpu(const cpumask_t *mask); | ||
814 | 813 | ||
815 | #define first_cpu(src) __first_cpu(&(src)) | 814 | #define first_cpu(src) __first_cpu(&(src)) |
816 | #define next_cpu(n, src) __next_cpu((n), &(src)) | 815 | #define next_cpu(n, src) __next_cpu((n), &(src)) |
817 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) | 816 | #define any_online_cpu(mask) cpumask_any_and(&mask, cpu_online_mask) |
818 | #define for_each_cpu_mask(cpu, mask) \ | 817 | #define for_each_cpu_mask(cpu, mask) \ |
819 | for ((cpu) = -1; \ | 818 | for ((cpu) = -1; \ |
820 | (cpu) = next_cpu((cpu), (mask)), \ | 819 | (cpu) = next_cpu((cpu), (mask)), \ |
diff --git a/lib/cpumask.c b/lib/cpumask.c index 0b660118ed91..402a54ac35cb 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c | |||
@@ -26,18 +26,6 @@ int __next_cpu_nr(int n, const cpumask_t *srcp) | |||
26 | EXPORT_SYMBOL(__next_cpu_nr); | 26 | EXPORT_SYMBOL(__next_cpu_nr); |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | int __any_online_cpu(const cpumask_t *mask) | ||
30 | { | ||
31 | int cpu; | ||
32 | |||
33 | for_each_cpu(cpu, mask) { | ||
34 | if (cpu_online(cpu)) | ||
35 | break; | ||
36 | } | ||
37 | return cpu; | ||
38 | } | ||
39 | EXPORT_SYMBOL(__any_online_cpu); | ||
40 | |||
41 | /** | 29 | /** |
42 | * cpumask_next_and - get the next cpu in *src1p & *src2p | 30 | * cpumask_next_and - get the next cpu in *src1p & *src2p |
43 | * @n: the cpu prior to the place to search (ie. return will be > @n) | 31 | * @n: the cpu prior to the place to search (ie. return will be > @n) |