lkml.org 
[lkml]   [2019]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH net-next] mlxsw: Fix 64-bit division in mlxsw_sp_sb_prs_init
Date
On Wed, Oct 30, 2019 at 09:01:52AM -0700, Nathan Chancellor wrote:
> When building for 32-bit ARM, there is a link time error because of a
> 64-bit division:
>
> ld.lld: error: undefined symbol: __aeabi_uldivmod
> >>> referenced by spectrum_buffers.c
> >>> net/ethernet/mellanox/mlxsw/spectrum_buffers.o:(mlxsw_sp_buffers_init) in archive drivers/built-in.a
> >>> did you mean: __aeabi_uidivmod
> >>> defined in: arch/arm/lib/lib.a(lib1funcs.o
>
> Avoid this by using div_u64, which is designed to avoid this problem.
>
> Fixes: bc9f6e94bcb5 ("mlxsw: spectrum_buffers: Calculate the size of the main pool")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Tested-by: Ido Schimmel <idosch@mellanox.com>

Thanks, Nathan!

\
 
 \ /
  Last update: 2019-10-31 07:13    [W:0.186 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site