[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190930184031.GJ29694@zn.tnic>
Date: Mon, 30 Sep 2019 20:40:31 +0200
From: Borislav Petkov <bp@...en8.de>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Michal Kubecek <mkubecek@...e.cz>, linux-rdma@...r.kernel.org,
Saeed Mahameed <saeedm@...lanox.com>,
Leon Romanovsky <leon@...nel.org>, netdev@...r.kernel.org,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: ERROR: "__umoddi3"
[drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko] undefined!
On Mon, Sep 30, 2019 at 09:55:16AM -0700, Stephen Hemminger wrote:
> Could also us div_u64_rem here?
Yah, the below seems to work and the resulting asm looks sensible to me
but someone should definitely double-check me as I don't know this code
at all.
Thx.
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c
index 913f1e5aaaf2..b4302658e5f8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c
@@ -137,7 +137,7 @@ dr_icm_pool_mr_create(struct mlx5dr_icm_pool *pool,
icm_mr->icm_start_addr = icm_mr->dm.addr;
- align_diff = icm_mr->icm_start_addr % align_base;
+ div_u64_rem(icm_mr->icm_start_addr, align_base, &align_diff);
if (align_diff)
icm_mr->used_length = align_base - align_diff;
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists