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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62F32EC8742 for ; Thu, 7 Sep 2023 16:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232526AbjIGQIq (ORCPT ); Thu, 7 Sep 2023 12:08:46 -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) Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@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!