@@ -123,6 +123,12 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
123
123
return 0 ;
124
124
}
125
125
126
+ static inline unsigned int cpumask_first_and (const struct cpumask * srcp1 ,
127
+ const struct cpumask * srcp2 )
128
+ {
129
+ return 0 ;
130
+ }
131
+
126
132
static inline unsigned int cpumask_last (const struct cpumask * srcp )
127
133
{
128
134
return 0 ;
@@ -167,7 +173,7 @@ static inline unsigned int cpumask_local_spread(unsigned int i, int node)
167
173
168
174
static inline int cpumask_any_and_distribute (const struct cpumask * src1p ,
169
175
const struct cpumask * src2p ) {
170
- return cpumask_next_and ( -1 , src1p , src2p );
176
+ return cpumask_first_and ( src1p , src2p );
171
177
}
172
178
173
179
static inline int cpumask_any_distribute (const struct cpumask * srcp )
@@ -195,6 +201,19 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
195
201
return find_first_bit (cpumask_bits (srcp ), nr_cpumask_bits );
196
202
}
197
203
204
+ /**
205
+ * cpumask_first_and - return the first cpu from *srcp1 & *srcp2
206
+ * @src1p: the first input
207
+ * @src2p: the second input
208
+ *
209
+ * Returns >= nr_cpu_ids if no cpus set in both. See also cpumask_next_and().
210
+ */
211
+ static inline
212
+ unsigned int cpumask_first_and (const struct cpumask * srcp1 , const struct cpumask * srcp2 )
213
+ {
214
+ return find_first_and_bit (cpumask_bits (srcp1 ), cpumask_bits (srcp2 ), nr_cpumask_bits );
215
+ }
216
+
198
217
/**
199
218
* cpumask_last - get the last CPU in a cpumask
200
219
* @srcp: - the cpumask pointer
@@ -585,15 +604,6 @@ static inline void cpumask_copy(struct cpumask *dstp,
585
604
*/
586
605
#define cpumask_any (srcp ) cpumask_first(srcp)
587
606
588
- /**
589
- * cpumask_first_and - return the first cpu from *srcp1 & *srcp2
590
- * @src1p: the first input
591
- * @src2p: the second input
592
- *
593
- * Returns >= nr_cpu_ids if no cpus set in both. See also cpumask_next_and().
594
- */
595
- #define cpumask_first_and (src1p , src2p ) cpumask_next_and(-1, (src1p), (src2p))
596
-
597
607
/**
598
608
* cpumask_any_and - pick a "random" cpu from *mask1 & *mask2
599
609
* @mask1: the first input cpumask
0 commit comments