From patchwork Mon Aug 27 15:38:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 10577393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1A8414BD for ; Mon, 27 Aug 2018 15:38:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB1FE29CD4 for ; Mon, 27 Aug 2018 15:38:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEBA029CD8; Mon, 27 Aug 2018 15:38:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5259929CD4 for ; Mon, 27 Aug 2018 15:38:57 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=p+1ceTRwsf6vz8mnjwIqDwWtGoABPpzrXkY5Qzb6fd0=; b=Th0 J6zGglqYLIbYed1ULZl5T99w19uF2quF3ZoRJpGebWfKL5dxblzvNNFny6mfIwI/KdOzOq1YHuklk DTryTf9/EIfAe7p5oPYfMm860HNA2JML/CE7570/Y87qotWv70vB/YSG9Eb8+xSuN5S5wOz+htNAG 5wCEtlD+AIu4VqpXbUiGtVPqtZil8DtEPCKymlr9HGXJbqqqR6OLY5cZC9jBM7ZAr8HrOnLnClP/v ZuI2QPX0pIRqZiRwagCqsbEN4/4Z2tQNtKsowxPrVjCpGp5hxztTKzSyQvpMhy7XxdlqfGF1gwsMC u9WnZmzpfQVh6ALXITlifNPz6vZ3wrA==; 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 1fuJbI-0002zx-U1; Mon, 27 Aug 2018 15:38:45 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuJbE-0002xB-7T for linux-arm-kernel@lists.infradead.org; Mon, 27 Aug 2018 15:38:42 +0000 Received: by mail-ed1-x543.google.com with SMTP id y20-v6so4121990edq.2 for ; Mon, 27 Aug 2018 08:38:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=c3VT5omGK/izHzrk1qG+6Wjt5RPSt905/uxgI+8ob10=; b=HQhdg2OnAaejArAa/vuCrEN8NLLjpQ8HN6zbQzT0Fu3iLtjRA5YsrLKTVi7E3TDdp9 aHw1WlkyiVJdz7le0t1JdimDTA7clO5TvFpXnG3zZ87FF+GnkZHZYKaoxmoo/0cdzDOu 2CAX6lqzXUeKnRgCd30YD1OXR2CnldU7GM8+k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=c3VT5omGK/izHzrk1qG+6Wjt5RPSt905/uxgI+8ob10=; b=f08V83Dm/osUa1rcAACGC20w3XDBMy/mVinka5RimemaPftcO+DWhZ3hO+TRitkS2V i4hDbxMjKL2bjI4lMoGqGx7DOMi9Wq+/nXNlkjbtJaqAUjUjLW2iubA9mD5IbG/en1zl M3gudOCCRgA58tOorErLf4owpp9vjMcHTBO406owtcGJrTSHVnHEzC/tFPUXS61wX7VS u6X6baP67Uolb2BznuGFwX/mfSYMk0Wi1kKrLG39mbKdQvSiH5TzbrMBz4lIJgAJCJWb 3yIjFpSs2pz8pL92Q2Z7+nt4L5xvp+4EaOZDFZiD97kNnOyOeXlCJgJ5n1HIYoIRIwmT 3+KQ== X-Gm-Message-State: APzg51Dxw/6H7U2CT599QV7uiLoJgjXtbmlOu+tJcdh/wjYdNAvAYqIB bRcSGbaq66FM12MQlIoNgvR8CA== X-Google-Smtp-Source: ANB0Vday9e4Wt2rfJL2OoTnw6rCjy2DVN3xDGjWS4HwUDpKusIaWcZK2qhXWvdvLvpCOBV/ZQJXVXA== X-Received: by 2002:aa7:c5cd:: with SMTP id h13-v6mr17244447eds.27.1535384308461; Mon, 27 Aug 2018 08:38:28 -0700 (PDT) Received: from rev02.home ([2a02:a212:9283:9800:24b9:e2d6:9acc:50dd]) by smtp.gmail.com with ESMTPSA id r44-v6sm8852984edd.87.2018.08.27.08.38.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Aug 2018 08:38:27 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Subject: [PATCH 0/2] crypto: arm64/crct10dif - refactor and implement non-Crypto Extension version Date: Mon, 27 Aug 2018 17:38:10 +0200 Message-Id: <20180827153812.6763-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180827_083840_280734_41809C27 X-CRM114-Status: UNSURE ( 7.39 ) 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: herbert@gondor.apana.org.au, linux-scsi@vger.kernel.org, jeff.lien@wdc.com, Ard Biesheuvel , linux-kernel@vger.kernel.org, martin.petersen@oracle.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The current arm64 CRC-T10DIF code only runs on cores that implement the 64x64 bit PMULL instructions that are part of the optional Crypto Extensions, and falls back to the highly inefficient C code otherwise. Let's provide a SIMD version that is twice as fast as the C code even on a low end core like the Cortex-A53, and is time invariant and much easier on the D-cache. Some performance numbers at the bottom. Ard Biesheuvel (2): crypto: arm64/crct10dif - preparatory refactor for 8x8 PMULL version crypto: arm64/crct10dif - implement non-Crypto Extensions alternative arch/arm64/crypto/crct10dif-ce-core.S | 314 +++++++++++++++----- arch/arm64/crypto/crct10dif-ce-glue.c | 14 +- 2 files changed, 251 insertions(+), 77 deletions(-)