@@ -138,18 +138,23 @@ int mlx5_set_msix_vec_count(struct mlx5_core_dev *dev, int function_id,
138
138
return ret ;
139
139
}
140
140
141
- static void irq_release (struct mlx5_irq * irq )
141
+ static void mlx5_system_free_irq (struct mlx5_irq * irq )
142
142
{
143
- struct mlx5_irq_pool * pool = irq -> pool ;
144
-
145
- xa_erase (& pool -> irqs , irq -> index );
146
143
/* free_irq requires that affinity and rmap will be cleared
147
144
* before calling it. This is why there is asymmetry with set_rmap
148
145
* which should be called after alloc_irq but before request_irq.
149
146
*/
150
147
irq_set_affinity_hint (irq -> irqn , NULL );
151
- free_cpumask_var (irq -> mask );
152
148
free_irq (irq -> irqn , & irq -> nh );
149
+ }
150
+
151
+ static void irq_release (struct mlx5_irq * irq )
152
+ {
153
+ struct mlx5_irq_pool * pool = irq -> pool ;
154
+
155
+ xa_erase (& pool -> irqs , irq -> index );
156
+ mlx5_system_free_irq (irq );
157
+ free_cpumask_var (irq -> mask );
153
158
kfree (irq );
154
159
}
155
160
@@ -556,7 +561,7 @@ static void mlx5_irq_pool_free_irqs(struct mlx5_irq_pool *pool)
556
561
unsigned long index ;
557
562
558
563
xa_for_each (& pool -> irqs , index , irq )
559
- free_irq (irq -> irqn , & irq -> nh );
564
+ mlx5_system_free_irq (irq );
560
565
}
561
566
562
567
static void mlx5_irq_pools_free_irqs (struct mlx5_irq_table * table )
0 commit comments