Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7454006ybn; Mon, 30 Sep 2019 14:12:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOl5Gka7E3FEOmEolDVmkHr0THTrSthmMgRpz5U2mWYBNdq52p6H+OL7kDa2lwgPqGlYc9 X-Received: by 2002:a17:906:4b15:: with SMTP id y21mr14394339eju.112.1569877974097; Mon, 30 Sep 2019 14:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569877974; cv=none; d=google.com; s=arc-20160816; b=H9Sd0rxQqKvyYzb7fD5rKWi3H0JkRZ3LdPvxOk6J56nsS3nQU1M7BxFsunmpGzooXE AxNv5CkLzpqruymYBqc6d8KbMTQdT5tr8HxR/XvNeTMa/TitjMWlhZ52cG+7fdmk+X6x 6vq+ezhIk+2HbStQ9xieylSzNsc6lMMiDsxTBkj1dwz5yhAcz1IRyf0HzctMSqt9l+v7 s7KvmDub/3eV8/KKgPzjUyXuMAgLsMGR8ptj1r/JhZTRPXjT+rH0AZjniuz/bolwbgHU yopkGNsjvegOsLBkN7VVSoI8somYrewZ3wJqpYzNgyRJvlizpqQ8WtH1JN5Xpcho6jM/ 2A/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gjuUURFhig2Mz245AWDhCbYKl1S5jT5FaViGxJ9r5BM=; b=lKCjS48zdvr6FFZhJ6K2kLTp3T0MXRWEFTR5oAqKAIkUMUwKI26O1KdhHyi0HCCVX2 GoKLqNP5csyqsAJ3HocxRjZXTOSUGe53EjkMfdHHqe283PRQG/PjGKy7YF46eos4EPCp 2bkrw0iws3Z2+dYketpoTEh79LDjFdCWGwc01qpBQul9wSBaRR1KiftQQJd36bG3wTva 9uo1cAb+3WG4zbXJCnpLMzybNi1/AGn1R6V1EGLK9495hdhSY/Ovtghyfjbo/gNQNgLm BohTKQu2s5VGCesRlPv/HYR0KIGinOmcNUqAnYWvziJvzfvU0kRY+v4n2D1dkUnpkmJ0 BHOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BGeaWwcS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t26si7067377eju.238.2019.09.30.14.12.28; Mon, 30 Sep 2019 14:12:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BGeaWwcS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732618AbfI3VKH (ORCPT + 99 others); Mon, 30 Sep 2019 17:10:07 -0400 Received: from mail.skyhub.de ([5.9.137.197]:33286 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729740AbfI3VKH (ORCPT ); Mon, 30 Sep 2019 17:10:07 -0400 Received: from zn.tnic (p200300EC2F058B00329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f05:8b00:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id BE3CA1EC0586; Mon, 30 Sep 2019 20:40:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1569868833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=gjuUURFhig2Mz245AWDhCbYKl1S5jT5FaViGxJ9r5BM=; b=BGeaWwcS2WkEs3PpXGJ+M/oYTYqveWi8TBVzB9Z9QCa9AOXoz0DxVEE+kx/LUm/1PByTBJ Wmgbz0Ek39oXPN97PJD0tNRCehX34b7ht6qypukdtM6ZMS4hjU7D2ceIlaPt3cd0n0KJYF dFdKLlWw1DdAA4JHroy+YjbPf1GTFyk= Date: Mon, 30 Sep 2019 20:40:31 +0200 From: Borislav Petkov To: Stephen Hemminger Cc: Michal Kubecek , linux-rdma@vger.kernel.org, Saeed Mahameed , Leon Romanovsky , netdev@vger.kernel.org, lkml Subject: Re: ERROR: "__umoddi3" [drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko] undefined! Message-ID: <20190930184031.GJ29694@zn.tnic> References: <20190930141316.GG29694@zn.tnic> <20190930154535.GC22120@unicorn.suse.cz> <20190930162910.GI29694@zn.tnic> <20190930095516.0f55513a@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190930095516.0f55513a@hermes.lan> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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