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: 10577381 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 19E4F14BD for ; Mon, 27 Aug 2018 15:38:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03FEF29C8B for ; Mon, 27 Aug 2018 15:38:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAD2B29CD4; Mon, 27 Aug 2018 15:38:31 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5337429C8B for ; Mon, 27 Aug 2018 15:38:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727305AbeH0TZh (ORCPT ); Mon, 27 Aug 2018 15:25:37 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:37911 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbeH0TZh (ORCPT ); Mon, 27 Aug 2018 15:25:37 -0400 Received: by mail-ed1-f68.google.com with SMTP id h33-v6so8209240edb.5 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=SzitT8Fjen1/axPUgvZrojstq+Sa6ATb/MJPX1KosEgd8JxvbM6xxB0UMl9hViR6rY 9Rbua5ZmHTNTkb/kKoRqfF1FZKkZf+1wH1xzBYi0qIpzrRjOrgVK5kcG7vfYsmEfh4cP CMb4VfFZ6rbEyoOTsbOj5UlgthURuFITujJC8tHflID8prAx++lp7VpYnbsaatOjG3WQ jSDgyNUT7MDsIe4xvpT3vhzjKPznBYnf9GukcC5b88YR4/GRh6HnFlFuJo/jHz7DTZEE TuCtF3bK1xnDb8h9Gpss9vmYrhfaD1DcsF0ot0zfEliJSAtNjP1K3Hp8gtvasWksS5eD xKkA== X-Gm-Message-State: APzg51CtDI5sTxc0U2oCfdKwn4sngXyaAbDLDqcxraLn+SDpWfslzDkB WaiIYTvSJujvtlo30yvyGN4//w== 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 Cc: herbert@gondor.apana.org.au, linux-arm-kernel@lists.infradead.org, martin.petersen@oracle.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, jeff.lien@wdc.com, Ard Biesheuvel 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 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.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(-)