From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0C9EC04AB6 for ; Tue, 28 May 2019 14:01:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 79B90214D8 for ; Tue, 28 May 2019 14:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559052116; bh=DNS9HBKYsW+rBcgfdPEl8z3csl2gMl5A4ceh0Wgm4UM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=dQBXZP4fK0i1RrHulruzMr2ctM1MMNJwRxVP/G0zWZIKau8v4z6e/LdG7/e8EmDRX Lp/JVN6wSW+qC/OOT2deJk5OQUGlyIpuqb8xAtN6oweUqLy4qQB7hFp4S2KtCBN6fZ ppHuavAAqDa0yOLQqVWGtpVf+GGRbd0sqFcYh/nU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727565AbfE1OBz (ORCPT ); Tue, 28 May 2019 10:01:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:43038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbfE1OBy (ORCPT ); Tue, 28 May 2019 10:01:54 -0400 Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CF9D32133F; Tue, 28 May 2019 14:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559052113; bh=DNS9HBKYsW+rBcgfdPEl8z3csl2gMl5A4ceh0Wgm4UM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gf3w3Vm7BwY/pEAK+HEUChIyrZBYrhGvZ1N3oDFytvA/J4oy6ReJUrt1eRGe4Vtyy Vppgheq8RFLIdNoZLvwjYie0tPXeHUgUh25C2OoGGME1zhlL5YNovMVV4N/U5/sPz8 25VAXSA8z34IDEoiCGYYQbFamRIcXUORh+Qghky4= Date: Tue, 28 May 2019 17:01:45 +0300 From: Leon Romanovsky To: Michal Kubecek Cc: Doug Ledford , Jason Gunthorpe , Ariel Levkovich , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mlx5: avoid 64-bit division Message-ID: <20190528140145.GO4633@mtr-leonro.mtl.com> References: <20190520111902.7104DE0184@unicorn.suse.cz> <20190520112835.GF4573@mtr-leonro.mtl.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190520112835.GF4573@mtr-leonro.mtl.com> User-Agent: Mutt/1.11.4 (2019-03-13) 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 02:28:35PM +0300, Leon Romanovsky wrote: > 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. > > Interesting, we tried to solve it differently. > I added it to our regression to be on the same side. This patch works for us. Thanks, Reviewed-by: Leon Romanovsky