]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_ptp: Fix compilation on 32-bit ARM
authorShalom Toledo <shalomt@mellanox.com>
Tue, 18 Jun 2019 12:45:35 +0000 (12:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Jun 2019 15:52:36 +0000 (08:52 -0700)
commitb780dd151e55d449862bee96b3d30fd6da791f2f
treeecbbc1ad8c8df65beafe050660025c7594b7628f
parent4c197b419208efbfc3e3c9baa098fddb65052a2a
mlxsw: spectrum_ptp: Fix compilation on 32-bit ARM

Compilation on 32-bit ARM fails after commit ebc5916d8fc4 ("mlxsw:
spectrum_ptp: Add implementation for physical hardware clock operations")
because of 64-bit division:

arm-linux-gnueabi-ld:
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.o: in function
`mlxsw_sp1_ptp_phc_settime': spectrum_ptp.c:(.text+0x39c): undefined
reference to `__aeabi_uldivmod'

Fix by using div_u64().

Fixes: ebc5916d8fc4 ("mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations")
Signed-off-by: Shalom Toledo <shalomt@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c