Skip to content

Commit

Permalink
net/mlx5: Fix build break when CONFIG_SMP=n
Browse files Browse the repository at this point in the history
[ 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>
  • Loading branch information
Saeed Mahameed authored and Greg Kroah-Hartman committed Nov 4, 2018
1 parent b0ee9bd commit fe54a7c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions include/linux/mlx5/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -1195,17 +1195,7 @@ enum {
static inline const struct cpumask *
mlx5_get_vector_affinity_hint(struct mlx5_core_dev *dev, int vector)
{
struct irq_desc *desc;
unsigned int irq;
int eqn;
int err;

err = mlx5_vector2eqn(dev, vector, &eqn, &irq);
if (err)
return NULL;

desc = irq_to_desc(irq);
return desc->affinity_hint;
return dev->priv.irq_info[vector].mask;
}

#endif /* MLX5_DRIVER_H */

0 comments on commit fe54a7c

Please sign in to comment.