Skip to content

Commit fe54a7c

Browse files
Saeed Mahameedgregkh
authored andcommitted
net/mlx5: Fix build break when CONFIG_SMP=n
[ Upstream commit e3ca348 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b0ee9bd commit fe54a7c

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

include/linux/mlx5/driver.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,17 +1195,7 @@ enum {
11951195
static inline const struct cpumask *
11961196
mlx5_get_vector_affinity_hint(struct mlx5_core_dev *dev, int vector)
11971197
{
1198-
struct irq_desc *desc;
1199-
unsigned int irq;
1200-
int eqn;
1201-
int err;
1202-
1203-
err = mlx5_vector2eqn(dev, vector, &eqn, &irq);
1204-
if (err)
1205-
return NULL;
1206-
1207-
desc = irq_to_desc(irq);
1208-
return desc->affinity_hint;
1198+
return dev->priv.irq_info[vector].mask;
12091199
}
12101200

12111201
#endif /* MLX5_DRIVER_H */

0 commit comments

Comments
 (0)