Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4205807ybv; Sun, 16 Feb 2020 16:36:35 -0800 (PST) X-Google-Smtp-Source: APXvYqziAt2mDc3kSpKeow76QWzp06T/cj3y5/FEx4g3P5TRsj8jmY3dj8Cm2uUi9w7TD/AOtGWz X-Received: by 2002:a05:6830:1353:: with SMTP id r19mr10608566otq.288.1581899794978; Sun, 16 Feb 2020 16:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581899794; cv=none; d=google.com; s=arc-20160816; b=zDyz7FisID1vqOT8DWINJSaC2Djlfx5Yll75TAB2YKe90THSuRxYJC3fvujQNpYNyS ir87QumPRox5qiesswypPXe066SP6ai2MVo+pHtVFRLQTR8yuc7hdQysVEaFe9O+2vGn aLzj7zMI2p3nkOT2cVqepkadOSS/SYtJCDVdPEFyYCfTboZB6If7Qb3jLMVt/wCsLBGk 7Is7Xa01K20L+W0kCdOZQanw/94WIxpKwqVpLHHVhCTCw2loXep6pXHajSb8rOl9QavE mcPAaafb0OjJjrB5t9hp9qPqAeFcfXl/SMoCa3paBuIHN4I1OojrgtXH+b/ci97gCQyb Ff+A== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PAiDoNcDSsPnNj5W4mWsQjtsAOyOXebI5Rn/LeRO4A0=; b=EpcCWL/NqKSi+kfeqAEt1NSrMhwf86Nsy0lubsg8gn+lksnlHspcGAUuqcaFf7lJGI UadbPIb6N3KdTJi4zCfP9KOC67kdNpfgFmJUd/I7uxTB100gXTQ3l5M1xo64dPzorvGD D5IzjZds15yOhRhgjKwXzhP5n1ydsHudA3pOHIkdxR2/3E8gk5QFNE5JgcsuUx0Nr2E1 HL/Z4Fy3ESjEbNWfVQZjN2riP2rg20r1cubhw5Bid3M/tkesUwRepjIyYeylmM2F9PXg FGlrW3vWjRwz5zQ3gKOOcxKV30vFiBAFzSFHpV9EhDF+DAMEiBaCuOSSBE023b3Cn7pO K/3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=jtpOapbH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si6575128otp.230.2020.02.16.16.36.22; Sun, 16 Feb 2020 16:36:34 -0800 (PST) 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=@ziepe.ca header.s=google header.b=jtpOapbH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726623AbgBQAgO (ORCPT + 99 others); Sun, 16 Feb 2020 19:36:14 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:33725 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726560AbgBQAgN (ORCPT ); Sun, 16 Feb 2020 19:36:13 -0500 Received: by mail-qk1-f196.google.com with SMTP id h4so14725083qkm.0 for ; Sun, 16 Feb 2020 16:36:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=PAiDoNcDSsPnNj5W4mWsQjtsAOyOXebI5Rn/LeRO4A0=; b=jtpOapbHFVjp/wJYElpr+0+UN+bnlIm8e5HSRL2u+Y9QkgTx8DY8UMOMNuycHEMJca Y4FkUIHdZPwmPx1cJYizjiP458SAypboQ6RKWnROZb8xEEagkFUFAmmJ4gDJzZ5qmwf1 dM039k0juLOOeE1Bg699rDYhNyGIoPHBHYIGZgiQ9RVTXp6TFbiirga3jYjVWEN0FuUf HzrS/XUtO3uRp67ScZMRUVlbcNDCoUIag9WreZ+KXOIaQ7gO/vb1dMcLVf8EOc6mq67D DnnGURL6m+33HicB+cg1TApImTExGruhDQE3mqo3kwVwc0Q/pgFUZW1adIWKhpNeRX4U fWMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=PAiDoNcDSsPnNj5W4mWsQjtsAOyOXebI5Rn/LeRO4A0=; b=lfYqAEDoUZ++m3S6ouWp0pDND231MHi/yBQv9iCxjXmOY2UjaYmZCGxD6WDRro0IG0 CmfGDyV/MDhjmrtpRabB1yFtwCDZR02pctB7PMlLDn1cv+DjU6LnNFlXFPb/kAdGM6WI 5BYvMP60EZ2jJjF2vnGWXI/PVmKwlpkvrgC7zFMV5dPcyS5M47MIKrREoLFa38pdTwIO 92J0ZjqUZZCVSmtBFvaXUg86sI/qrmsfBlnxulPe210o2g7S72+vKLGjt1wEO8bXWE5/ Oor8rq79scW95DJgEsG3+OIs+QQpoVMA2K00wUJtZZH7m7XJRJNgvS1aniP33Jtkxzzu t/kQ== X-Gm-Message-State: APjAAAUNuIeWAGMNc1P8xl64e9WYZMfxgjdNDCu6LVXRSiungkGYcwz+ FNml/htwTjSBLy8KL03KwnA6qA== X-Received: by 2002:a37:6690:: with SMTP id a138mr9654539qkc.475.1581899772343; Sun, 16 Feb 2020 16:36:12 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id h13sm7852610qtu.23.2020.02.16.16.36.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Feb 2020 16:36:11 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1j3UOQ-0003Nj-Fg; Sun, 16 Feb 2020 20:36:10 -0400 Date: Sun, 16 Feb 2020 20:36:10 -0400 From: Jason Gunthorpe To: Maxim Mikityanskiy Cc: Alexander Lobakin , Leon Romanovsky , Doug Ledford , Yishai Hadas , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH rdma] IB/mlx5: Fix linkage failure on 32-bit arches Message-ID: <20200217003610.GC31668@ziepe.ca> References: <20200214191309.155654-1-alobakin@dlink.ru> <20200214192410.GW31668@ziepe.ca> <6f7c270fef9ec5bae2dcb780dee3f49f@dlink.ru> <3c70c7da-60aa-10ec-767f-5e519357b8e6@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3c70c7da-60aa-10ec-767f-5e519357b8e6@mellanox.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 16, 2020 at 01:53:50PM +0200, Maxim Mikityanskiy wrote: > On 2020-02-14 21:44, Alexander Lobakin wrote: > > Jason Gunthorpe wrote 14.02.2020 22:24: > > > On Fri, Feb 14, 2020 at 10:13:09PM +0300, Alexander Lobakin wrote: > > > > Commit f164be8c0366 ("IB/mlx5: Extend caps stage to handle VAR > > > > capabilities") introduced a straight "/" division of the u64 > > > > variable "bar_size", which emits an __udivdi3() libgcc call on > > > > 32-bit arches and certain GCC versions: > > > > > > > > error: "__udivdi3" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] > > > > undefined! [1] > > > > > > > > Replace it with the corresponding div_u64() call. > > > > Compile-tested on ARCH=mips 32r2el_defconfig BOARDS=ocelot. > > > > > > > > [1] https://lore.kernel.org/linux-mips/CAMuHMdXM9S1VkFMZ8eDAyZR6EE4WkJY215Lcn2qdOaPeadF+EQ@mail.gmail.com/ > > > > > > > > > > > > Fixes: f164be8c0366 ("IB/mlx5: Extend caps stage to handle VAR > > > > capabilities") > > > > Signed-off-by: Alexander Lobakin > > > >  drivers/infiniband/hw/mlx5/main.c | 3 ++- > > > >  1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > Randy beat you too it.. > > > > > > https://lore.kernel.org/linux-rdma/20200206143201.GF25297@ziepe.ca/ > > > > Ah, OK. Sorry for missing this one. I didn't see any fix over > > git.kernel.org and thought it doesn't exist yet. > > > > > But it seems patchwork missed this somehow. > > > > > > Applied now at least > > Jason, I think Alexander's patch is more correct. It uses div_u64, while > yours uses div64_u64. The divider is 32-bit, so div_u64 would be more > optimized on most 32-bit architectures. Seems so, but it is already done. You can send a followup to fix it Jason