From patchwork Fri Oct 28 16:47:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13024053 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6EC09C38A02 for ; Fri, 28 Oct 2022 16:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6f7sUDryklv256OFFvNmzP2Z0GgDGfkH7gL1NK4ridg=; b=HcYjpQ09LWak8/ YOWEpf9+qlFTdajdg3pdA9N9+jryBEVWuenr777EvO4tjUFAl/UX1hUf45pY++djlRmJCGrWMtfXy jEsiIwBajPnkzwRWDlSvtdJGyzkljdBbXUuE4U2+YCq11nrNU6wvp2hGP37QulraU1hiicuo32HIJ A2WjU6QkHczJtR3kbJN5wnlDDK18n6AkdTB7U/lYjvA/toHK784wd0hLdUSlPiMfsvYcz37IFvMp7 V5rWrXYhklywmrjxqHaO51PN9uyNwyZHhAHlFJkPGOtgGZUVY9m+tBfktWveQXrwjk4cag3ym5KJO C7UN5pYmuDHoHbI6HDhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooSW0-0010kf-PC; Fri, 28 Oct 2022 16:47:28 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooSVx-0010it-Lk for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 16:47:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: 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:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Vf6WNjRrnNoJD4F4zYNGY5IkKPLfI5Fyrgdl2dIKPkg=; b=OiJXxZFjIgvS2nP1y/trRByLMx V1XmqNfeE7TNpwiT+CMIBDPjRcvnUJ7vufyCZDwry5onEe2Ie6tkB+QiylpEVrZ5QLx6dXiygSZVL NdOxGlXWXXejqRo9/QPu65ZLCTOtVWk7wlVJTssUXAeQkSwg+u6uBEmMLNTmLjZ1WQfWzK+xgUixA Yp1mG+7ovLt6Jyq27wfG/37idoKwp35zTsdSKoWGE/p+WSAVAIbQWL6EAbpXu070RDl4fyrRWZ7g0 ncF+I5f1d6AbYcO3zxfazO4WFirlmfgdqnEawT/ex+0cNXARrQogSfHp0l6sMMmoVQQ3tD6c5V8v5 ysaWThAg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35010) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ooSVr-00006C-E5; Fri, 28 Oct 2022 17:47:19 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ooSVp-0002ia-75; Fri, 28 Oct 2022 17:47:17 +0100 Date: Fri, 28 Oct 2022 17:47:17 +0100 From: "Russell King (Oracle)" To: Yury Norov Cc: Catalin Marinas , Linus Torvalds , linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , Mark Rutland , Will Deacon Subject: [PATCH 0/5] ARM: findbit assembly updates Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_094725_726327_24B2C79E X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This series updates the arm32 assembly versions of the findbit operations: - Document ARMv5 code that calculates the bit offset - Provide an updated ARMv7 implementation using the rbit instruction - Switch to use macros instead of duplicating mostly identical code - Switch to using word loads rather than byte loads - Add unwinder information for backtracing I've had it sitting around in-use for some time, and no issues have arisen. Tested also outside the kernel tree in userspace and results are the same with the previous implementation. Testing with the find_bit benchmark module shows that these operations coded in assembly are faster than the generic versions (previously posted), so I believe they're worth keeping. arch/arm/include/asm/assembler.h | 6 + arch/arm/lib/findbit.S | 230 +++++++++++++++------------------------ 2 files changed, 94 insertions(+), 142 deletions(-)