Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6533300ybi; Wed, 29 May 2019 09:10:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgdchX/ucXU6VI0BKG0wlIPPYYbglVQpq5diy+Or2ug2gBh2D0zwsEtGQcrUedPat4HIqR X-Received: by 2002:a63:d04b:: with SMTP id s11mr139447957pgi.187.1559146210293; Wed, 29 May 2019 09:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559146210; cv=none; d=google.com; s=arc-20160816; b=e31Vp/fv8A6VV9ShBzWXEBvYhUAvi3NyMj7gweIBBAMot9rLlMegeRyQuDkdy2q/Pd 9zFKtf4Hxuu/FjnmvwRRYCoRrPWUbPrYa/XZhG4/AfPukpDztILkwgdGTqcrGsaXVY5T c8yMf4Pq4f/WbVQl5OxorafwU53e02jp0/hokGIQ+tt5yhNd9H5J3o+8B633BoYBI/1s I9ZgWM2twwGFJtE6RNMKDsd627waKEhnI//kuLXnvEzx+FhDJAlkk9braVi8LbAw/WLl 6PpnonqRO372FIS8mpJN+3qc/nxI0RHzD/61k5+of2dMnJaOvOK5GmEIaMupr/UGpUyV lHSQ== 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=Fsh0TYYc8CcoupHMZiwDZqdBbvSIVmD8HEtsKuwww8s=; b=S72MPv+Snu8NvDMbTNn/LbLmCsifffhs7gWpbobuLrN7C+Rvx5cDSgDzVKBjeExZR+ tDeyDVplhqdjlf91+qS2G1z7laP5ypIidJa0+moIM+Ixl7arFp74n1+bgQ9hBPYo0gKx S4rDhaeCd1QxNg4OK1hfKbRNs9jyw9Cobfm3kavDZ7C9nJCEtiBPkkInBoln3qiXPyFQ m9nbvE4jqtXD92Xmlg36igyP5TkUuasl1YunF9iFIOrouzuD4A7+ET219tZyc61eCE2k GHawfZbIKK5ykkfJf749Ge0RiTf6Tj7UgJQHEIBRwjqvAVVIBbICgQV96YJFtwfw8CaH M5mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=Alfsrw1M; 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 i16si9646pgh.549.2019.05.29.09.09.50; Wed, 29 May 2019 09:10:10 -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=@ziepe.ca header.s=google header.b=Alfsrw1M; 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 S1726617AbfE2QID (ORCPT + 99 others); Wed, 29 May 2019 12:08:03 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:46770 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbfE2QIC (ORCPT ); Wed, 29 May 2019 12:08:02 -0400 Received: by mail-qk1-f194.google.com with SMTP id a132so1781073qkb.13 for ; Wed, 29 May 2019 09:08:02 -0700 (PDT) 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:in-reply-to:user-agent; bh=Fsh0TYYc8CcoupHMZiwDZqdBbvSIVmD8HEtsKuwww8s=; b=Alfsrw1MVw34ZMTuaGUxB/ZqEsRTzwdDj0vXoeivqbB0oyFDAIptz8nj+2u3RnZVnL jAkqVvr3hZEHvsxwiYYKjvuRy7L8SLIhoM+iZgtk5APZMQBzygh9x3JvHKhqPFu/GrrJ kqGcJ+4PNJWFHh0cl4JFydycISRCpMv5JilO8aoH2kakAl1Mi0oy29buspX8OLIcOer+ W9VeGsHHmC2Hpz7uOpb43qDTXKM5z7HFAmmCW9GMnylg1VwbyjEkEALrhGNBr4HBgwej fJJLOLQjrUhhQHtbgpuLOJpQx1Rz9CupCAMAWIFCV3X3WV6h7ciLKihet+bDXWlb6XQv mYRw== 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:in-reply-to:user-agent; bh=Fsh0TYYc8CcoupHMZiwDZqdBbvSIVmD8HEtsKuwww8s=; b=DMZ5vKsa1GBplD6RtKf5WxMvNxhVtA0Gz5cUtQC3VwiCW18kt8NVuX4lBq0owJQsKn u5OiD6YNCkbm845UjvM1SCxP7ZqLW+4mnh+9C4tUNtVD+M4u9TtjCSzN5fU5+e0ssT2X GHFLsft4z6qLkVVT0trY9SoY/SsrNTBvsuJCg7utfLdH5OxLi4wWoGgFXeyndnWbPDtI 5XeMxCB+XoehHD00DetYZ4JtxbvC8xufTzkWrIWTEPpygYH7kKwVGJpkuc2p5AjVUk9O E+XikP863lzXMnHRLKJzJYlS3+SXqToEalTn3y0iKUAcIgLeG2AuMIuifc6g1MGtM19v XNyw== X-Gm-Message-State: APjAAAXAd5OKupiGW2jjnDUu7k/pQkDIM1F5GBsZDuvMj+Xsi8/RCTMl eLvULUQrx48AGo8qP57iInS8LuDVF1Q= X-Received: by 2002:a05:620a:13f9:: with SMTP id h25mr9603277qkl.283.1559146081685; Wed, 29 May 2019 09:08:01 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id r186sm518843qkd.95.2019.05.29.09.08.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2019 09:08:01 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hW17Q-0001kD-Je; Wed, 29 May 2019 13:08:00 -0300 Date: Wed, 29 May 2019 13:08:00 -0300 From: Jason Gunthorpe To: Michal Kubecek Cc: Leon Romanovsky , Doug Ledford , Ariel Levkovich , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mlx5: avoid 64-bit division Message-ID: <20190529160800.GA6680@ziepe.ca> References: <20190520111902.7104DE0184@unicorn.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190520111902.7104DE0184@unicorn.suse.cz> 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 Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > breaks i386 build by introducing three 64-bit divisions. As the divisor > is MLX5_SW_ICM_BLOCK_SIZE() which is always a power of 2, we can replace > the division with bit operations. > > Fixes: 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > Signed-off-by: Michal Kubecek > Reviewed-by: Leon Romanovsky > --- > drivers/infiniband/hw/mlx5/cmd.c | 9 +++++++-- > drivers/infiniband/hw/mlx5/main.c | 2 +- > 2 files changed, 8 insertions(+), 3 deletions(-) Applied to for-rc, thanks Jason