Re: [PATCH] mlx5: avoid 64-bit division

2019-05-29 Thread Jason Gunthorpe
On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > breaks i386 build by introducing three 64-bit divisions. As the divisor > is MLX5_SW_ICM_BLOCK_SIZE() which is always a power of 2, we can replace > the divisi

Re: [PATCH] mlx5: avoid 64-bit division

2019-05-28 Thread Ariel Levkovich
On Mon, May 20, 2019 at 02:28:35PM +0300, Leon Romanovsky wrote: > > On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > > > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > > > breaks i386 build by introducing three 64-bit divisions. As the

Re: [PATCH] mlx5: avoid 64-bit division

2019-05-28 Thread Leon Romanovsky
On Mon, May 20, 2019 at 02:28:35PM +0300, Leon Romanovsky wrote: > On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > > breaks i386 build by introducing three 64-bit divisions. As the divisor > > is MLX5_SW_I

Re: [PATCH] mlx5: avoid 64-bit division

2019-05-27 Thread Michal Kubecek
On Mon, May 27, 2019 at 03:15:34PM -0300, Jason Gunthorpe wrote: > On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > > diff --git a/drivers/infiniband/hw/mlx5/main.c > > b/drivers/infiniband/hw/mlx5/main.c > > index abac70ad5c7c..340290b883fe 100644 > > +++ b/drivers/infiniband/hw/

Re: [PATCH] mlx5: avoid 64-bit division

2019-05-27 Thread Jason Gunthorpe
On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > breaks i386 build by introducing three 64-bit divisions. As the divisor > is MLX5_SW_ICM_BLOCK_SIZE() which is always a power of 2, we can replace > the divisi

Re: [PATCH] mlx5: avoid 64-bit division

2019-05-20 Thread Leon Romanovsky
On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > breaks i386 build by introducing three 64-bit divisions. As the divisor > is MLX5_SW_ICM_BLOCK_SIZE() which is always a power of 2, we can replace > the divisi

[PATCH] mlx5: avoid 64-bit division

2019-05-20 Thread Michal Kubecek
Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") breaks i386 build by introducing three 64-bit divisions. As the divisor is MLX5_SW_ICM_BLOCK_SIZE() which is always a power of 2, we can replace the division with bit operations. Fixes: 25c13324d03d ("IB/mlx5: Add steering SW