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=-3.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT 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 DB6D3C169C4 for ; Thu, 31 Jan 2019 04:42:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B2FFD218AF for ; Thu, 31 Jan 2019 04:42:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ut/QIL0h"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="LxtkGGGa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2FFD218AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From: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=65iqjCDU8hGZ7y//YUHPWIdO0QNHKbeKfERHKUtmuKQ=; b=Ut/QIL0h8YVGry gCIRT3yZqzAGl0zABSwWAYYOWh2o3iFc9L0ufZcFozOxLcn7FEgJ1F9esgz6rxSQRKRUFBW1jrDlL J73+azZoF8tdUnSVflw1jTsA8E3ZDAU9ZKpuh1auYPRiH0wBmffLkdypJ3m40Qc6mSzKTLdzFeKOT QX+6N3w6GErDmC0vCJm/yMoX0B3vx3U4WLoj3Ce3sxVOw648pxrXk2uwq0YViOgUIrjgxiMms2Siv hFZ/wfrWxrKwamdqQspXtVO1LbhS4KlEOPx0RjFVa5diwAVIrX50tCY+H1VVys4OTxtHuwVVcbmFP zMYK91zl1kqjPpY87XCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gp4Bk-0003Ao-I1; Thu, 31 Jan 2019 04:42:56 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gp4Bg-00039j-WA for linux-arm-kernel@lists.infradead.org; Thu, 31 Jan 2019 04:42:54 +0000 Received: from sol.localdomain (c-107-3-167-184.hsd1.ca.comcast.net [107.3.167.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9E4E220870; Thu, 31 Jan 2019 04:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548909771; bh=iCZNpggkgIi1FfGsschHWT+9Cq7wKmMBAMfKVSHa6TY=; h=From:To:Cc:Subject:Date:From; b=LxtkGGGadrfnUXaZmU/URCr+OTc4dSfhQ55iseH0HNY3H1SMebTg5PGlSgd+EtWwD QYlJkFIZEAPjGxhmAgi8oemWfQqzevhjtDIy2vd7nl050BNRLfASYiIHMKSIbHEq5F fEw8fZVKvLv7gclaiD6SwR2EqVZbPk6UqRLt4+vY= From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Subject: [PATCH v4 0/3] crypto: crct10dif assembly cleanup and optimizations Date: Wed, 30 Jan 2019 20:42:39 -0800 Message-Id: <20190131044242.31591-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190130_204253_053945_82AB9AFC X-CRM114-Status: UNSURE ( 8.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Chen , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org The x86, arm, and arm64 asm implementations of crct10dif are very difficult to understand partly because many of the comments, labels, and macros are named incorrectly: the lengths mentioned are usually off by a factor of two from the actual code. Many other things are unnecessarily convoluted as well, e.g. there are many more fold constants than actually needed and some aren't fully reduced. This series therefore cleans up all these implementations to be much more maintainable. I also made some small optimizations where I saw opportunities, resulting in slightly better performance. This is based on top of the pending patches from Ard Biesheuvel. These all pass the new extra self-tests. Changed since v3: - Added '.arch armv7-a' to arm32 assembly file to fix a build error. - Removed support for len < 16 from the x86 assembly. Changed since v2: - Removed the unnecessary '__LINUX_ARM_ARCH__ < 7' case. - Added Ard's Acked-by. Changed since v1: - Moved constants in arm implementation to .rodata. - Eliminated a few instructions from the x86 implementation. - Tweaked a few comments. Eric Biggers (3): crypto: x86/crct10dif-pcl - cleanup and optimizations crypto: arm/crct10dif-ce - cleanup and optimizations crypto: arm64/crct10dif-ce - cleanup and optimizations arch/arm/crypto/crct10dif-ce-core.S | 553 ++++++++--------- arch/arm/crypto/crct10dif-ce-glue.c | 2 +- arch/arm64/crypto/crct10dif-ce-core.S | 496 +++++++-------- arch/arm64/crypto/crct10dif-ce-glue.c | 4 +- arch/x86/crypto/crct10dif-pcl-asm_64.S | 782 +++++++----------------- arch/x86/crypto/crct10dif-pclmul_glue.c | 12 +- 6 files changed, 729 insertions(+), 1120 deletions(-) -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel