Skip to content

Commit e3ca348

Browse files
Saeed Mahameeddavem330
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 <saeedm@mellanox.com> CC: Randy Dunlap <rdunlap@infradead.org> CC: Guenter Roeck <linux@roeck-us.net> CC: Thomas Gleixner <tglx@linutronix.de> Tested-by: Israel Rukshin <israelr@mellanox.com> Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
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)