|
@@ -5,6 +5,22 @@
|
|
#include <linux/export.h>
|
|
#include <linux/export.h>
|
|
#include <linux/bootmem.h>
|
|
#include <linux/bootmem.h>
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * cpumask_next - get the next cpu in a cpumask
|
|
|
|
+ * @n: the cpu prior to the place to search (ie. return will be > @n)
|
|
|
|
+ * @srcp: the cpumask pointer
|
|
|
|
+ *
|
|
|
|
+ * Returns >= nr_cpu_ids if no further cpus set.
|
|
|
|
+ */
|
|
|
|
+unsigned int cpumask_next(int n, const struct cpumask *srcp)
|
|
|
|
+{
|
|
|
|
+ /* -1 is a legal arg here. */
|
|
|
|
+ if (n != -1)
|
|
|
|
+ cpumask_check(n);
|
|
|
|
+ return find_next_bit(cpumask_bits(srcp), nr_cpumask_bits, n + 1);
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL(cpumask_next);
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* cpumask_next_and - get the next cpu in *src1p & *src2p
|
|
* cpumask_next_and - get the next cpu in *src1p & *src2p
|
|
* @n: the cpu prior to the place to search (ie. return will be > @n)
|
|
* @n: the cpu prior to the place to search (ie. return will be > @n)
|