Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp3317920rdb; Thu, 7 Sep 2023 10:51:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAKTtseN324zu7YjopFGelFtjxUDxx72a7Pqtt0xmYE6GS91gEBmFkzTbTS9LdPN5qRPk7 X-Received: by 2002:a05:6a00:4394:b0:68e:34ee:8602 with SMTP id bt20-20020a056a00439400b0068e34ee8602mr76586pfb.3.1694109114386; Thu, 07 Sep 2023 10:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694109114; cv=none; d=google.com; s=arc-20160816; b=CWZ0OmJ2CUY6UIi00aEKWVgoQ0eKcbDfwg8LPNXMEuh3wWPk8db190c5EnNSKp8XoP qCVbQZpLQ+kDDIlWxlmFWX1h5b8QXb+0wEp9FO84URh9D7qXD2B5r7yGk3NX/AePhERg lihwM2lwgEKPH2F1N0QvuJJXg0z7ChMQPHSr/dEHxXK6se+NwKWTTBcpdN9WcYbQ4ZlH vEfzcxcOmcYbNiTV0kxijYeWS1Zsjn/UzHi+2/yCMJYlZnfMSyw8KBwiNPsiEMj0B1Dc hEblt86sd9xTiusqAGGerYYIbmgaPp5xJpgpG/JVOoKzGdgQf1y+ZfwjcESATrYH2Vza KgAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=9U7UtfEdSnnxywMPXF+OgzCTVp9iErjz0p+rF6sp5Y0=; fh=P+MIALQwIpQ16nh0bUaGvsIFHpQZuRWC1S8x0X8pZrs=; b=sScngnZYqkuG88GkjSeZed6XswoxjiM2UdFQAr8Dp/fhEvS46XtGQPaQ3OSkgm6K+P YgxZ43eirR14C5teOyjPYd6yga1wCdJtKnz8OVvjqy2vJTdlJF2hNJbRMQniC2F9OZ70 CN2lqpGeecoSRDt+tlzqtUAuXJ3Ul5hl2w80bOelk0GzBcLPGdeTllmMMSJRznyGO8K6 mYq0U9hgvmYpM1edmdvDU07b3JdIlvGneo0egKjSAg8JCscYJDrG8MIGqCZDytLamsm4 KInORZbO7Uz1bMAC1j5RvvBaNC7icePfJCoLEAzJ/8wPjoK5WknbL01lq6Nqau949jSf wxpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="j9Li/W6n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a6567cf000000b00565f22f2347si13686716pgs.319.2023.09.07.10.51.41; Thu, 07 Sep 2023 10:51:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="j9Li/W6n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234727AbjIGQIr (ORCPT + 99 others); Thu, 7 Sep 2023 12:08:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240098AbjIGQIM (ORCPT ); Thu, 7 Sep 2023 12:08:12 -0400 Received: from pandora.armlinux.org.uk (unknown [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 934A022A5A; Thu, 7 Sep 2023 09:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9U7UtfEdSnnxywMPXF+OgzCTVp9iErjz0p+rF6sp5Y0=; b=j9Li/W6nKb0IVyyG1BmtWdAX8C bZYGlkAGnOk7pfVpG2QKqvGz0sPbf0EDV3Ch8AI+syL6yRGMdkJe8qHcQagYsDXKWpvLEQmSpq4xI n9ilcx6wkDkHH3MJzjXDFTT9LRipQzTlYYPxeTNBqOwM4OD7i0z/g0d5ekH9MnsBwBhl3B4KjbuR9 Xs9e6uLj+1ipCampQCEJSX75IWoAg9v6K4pP4gS4mzDTYk7ca6TdpEmblimXsVXf198bMikhDZaIQ 0tnnIT9ENJdnmuiv8c/XxfKdfHBEBj3RZL1ngj2RhsnI/yQgBO36kyWkGnFdq9hk18ZiYSgghLWoU Lcyj5ppw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35872) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qeAhM-0001fF-2I; Thu, 07 Sep 2023 09:49:12 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qeAhM-0005hP-MX; Thu, 07 Sep 2023 09:49:12 +0100 Date: Thu, 7 Sep 2023 09:49:12 +0100 From: "Russell King (Oracle)" To: Puranjay Mohan Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shubham Bansal , Mykola Lysenko , Shuah Khan , bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH bpf-next v2 5/8] arm32, bpf: add support for 32-bit signed division Message-ID: References: <20230906183320.1959008-1-puranjay12@gmail.com> <20230906183320.1959008-6-puranjay12@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230906183320.1959008-6-puranjay12@gmail.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,RDNS_NONE, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 06, 2023 at 06:33:17PM +0000, Puranjay Mohan wrote: > The cpuv4 added a new BPF_SDIV instruction that does signed division. > The encoding is similar to BPF_DIV but BPF_SDIV sets offset=1. > > ARM32 already supports 32-bit BPF_DIV which can be easily extended to > support BPF_SDIV as ARM32 has the SDIV instruction. When the CPU is not > ARM-v7, we implement that SDIV/SMOD with the function call similar to > the implementation of DIV/MOD. > > Signed-off-by: Puranjay Mohan Reviewed-by: Russell King (Oracle) Thanks, this is a lot more clear! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!