Skip to content

Commit e3ca348

Browse files
Saeed Mahameeddavem330
Saeed Mahameed
authored andcommitted
net/mlx5: Fix build break when CONFIG_SMP=n
Avoid using the kernel's irq_descriptor and return IRQ vector affinity directly from the driver. This fixes the following build break when CONFIG_SMP=n include/linux/mlx5/driver.h: In function ‘mlx5_get_vector_affinity_hint’: include/linux/mlx5/driver.h:1299:13: error: ‘struct irq_desc’ has no member named ‘affinity_hint’ Fixes: 6082d9c ("net/mlx5: Fix mlx5_get_vector_affinity function") Signed-off-by: Saeed Mahameed <[email protected]> CC: Randy Dunlap <[email protected]> CC: Guenter Roeck <[email protected]> CC: Thomas Gleixner <[email protected]> Tested-by: Israel Rukshin <[email protected]> Reported-by: kbuild test robot <[email protected]> Reported-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ab452c3 commit e3ca348

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

include/linux/mlx5/driver.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,17 +1286,7 @@ enum {
12861286
static inline const struct cpumask *
12871287
mlx5_get_vector_affinity_hint(struct mlx5_core_dev *dev, int vector)
12881288
{
1289-
struct irq_desc *desc;
1290-
unsigned int irq;
1291-
int eqn;
1292-
int err;
1293-
1294-
err = mlx5_vector2eqn(dev, vector, &eqn, &irq);
1295-
if (err)
1296-
return NULL;
1297-
1298-
desc = irq_to_desc(irq);
1299-
return desc->affinity_hint;
1289+
return dev->priv.irq_info[vector].mask;
13001290
}
13011291

13021292
#endif /* MLX5_DRIVER_H */

0 commit comments

Comments
 (0)