lkml.org 
[lkml]   [2019]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net] mlx5: avoid 64-bit division in dr_icm_pool_mr_create()
From
From: Alex Vesker <valex@mellanox.com>
Date: Wed, 2 Oct 2019 14:58:44 +0000

> On 10/2/2019 3:12 PM, Michal Kubecek wrote:
>> Recently added code introduces 64-bit division in dr_icm_pool_mr_create()
>> so that build on 32-bit architectures fails with
>>
>> ERROR: "__umoddi3" [drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko] undefined!
>>
>> As the divisor is always a power of 2, we can use bitwise operation
>> instead.
>>
>> Fixes: 29cf8febd185 ("net/mlx5: DR, ICM pool memory allocator")
>> Reported-by: Borislav Petkov <bp@alien8.de>
>> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
...
> Align diff is power of 2,  looks good to me.
> Thanks for fixing it Michal.

I'll just apply this directly, thanks everyone.

\
 
 \ /
  Last update: 2019-10-02 17:09    [W:0.042 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site