File tree 1 file changed +17
-4
lines changed
1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -249,12 +249,25 @@ static int assign_irq_vector(struct irq_data *irqd, const struct cpumask *dest)
249
249
250
250
static int assign_irq_vector_any_locked (struct irq_data * irqd )
251
251
{
252
+ /* Get the affinity mask - either irq_default_affinity or (user) set */
253
+ const struct cpumask * affmsk = irq_data_get_affinity_mask (irqd );
252
254
int node = irq_data_get_node (irqd );
253
255
254
- if (node != NUMA_NO_NODE ) {
255
- if (!assign_vector_locked (irqd , cpumask_of_node (node )))
256
- return 0 ;
257
- }
256
+ if (node == NUMA_NO_NODE )
257
+ goto all ;
258
+ /* Try the intersection of @affmsk and node mask */
259
+ cpumask_and (vector_searchmask , cpumask_of_node (node ), affmsk );
260
+ if (!assign_vector_locked (irqd , vector_searchmask ))
261
+ return 0 ;
262
+ /* Try the node mask */
263
+ if (!assign_vector_locked (irqd , cpumask_of_node (node )))
264
+ return 0 ;
265
+ all :
266
+ /* Try the full affinity mask */
267
+ cpumask_and (vector_searchmask , affmsk , cpu_online_mask );
268
+ if (!assign_vector_locked (irqd , vector_searchmask ))
269
+ return 0 ;
270
+ /* Try the full online mask */
258
271
return assign_vector_locked (irqd , cpu_online_mask );
259
272
}
260
273
You can’t perform that action at this time.
0 commit comments