Message ID | 20180724171224.17363-5-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp7516503ljj; Tue, 24 Jul 2018 10:12:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd84ZiytdI/ilhuoqNcAZZNVGuw+OPMggpqIrQEWBUFenMp36ocK996j7wW/oTrLyhouyut X-Received: by 2002:a63:5055:: with SMTP id q21-v6mr16588298pgl.397.1532452356985; Tue, 24 Jul 2018 10:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532452356; cv=none; d=google.com; s=arc-20160816; b=ILrh0dmLwzYOXLDplO6H/4iXDA+W3VGQHrKdlDJmEUH74aRs2PyVXkbp/cZ2Hwo90H EPaqDiAkA1JtnIkfrJ9rRCjFn/J9S/ITr5mTCjIsWfyE+xzcQBe5UGxqAzdJCZqQqrA/ ae7GHaarHEU7RKDDCuDwsCYodMMA7VIGphTYsIo3+UrnHQxtKa+pnUOL/XdwNhVsfBQO vxu8x8fylblrZ0iAbPPGOgfrx8pUxJLmG/Vp3g613c/2ljaKfIw5AHnDUBMBq8sGt1/h 16i1O6FSKjeDVU5TVXj9SDndNnp5dnpTSOyiYbZMZa4AnSyelP8Tn5EIGelEmkU169Y4 FGFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=qhx/Zni8hohoP5dPcKAraPiFZGgE5hZjWRzzfsLA36c=; b=HVq/0GliLT0kVm/3umshlGUE8w6WJ/26vsz+gklm3TsjyCoed3qVl7gdY9LBAn/qeT 50YRiZVBgTh1+Lu+6BefEQaMIAbkL/QxG7Ur0qj2K3slXlMeM29zxCn2P56C/0BZZVzI EpmXRdpaCRMD0FJ7Hw5CmeQDQ4aN8OBl9wk80jT1hUs0jkFz9iYvmRV1vfGdm2cP4X+7 X2nf9VW9qBKBWxKT3HgvrPOaR7hfuJRGxbvXrzflrYXGegfuDeH/LtZPolllRB16FtSA rTxDs3vFZtntqXjm4zgICsE+0LcbCe88/atbFWGBBjUXx0ALm09mmLHKKi7oR2tm54kN oW4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YGJ01zAB; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-crypto-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1-v6si10764942plb.8.2018.07.24.10.12.36; Tue, 24 Jul 2018 10:12:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YGJ01zAB; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388422AbeGXSUC (ORCPT <rfc822;victor.chong@linaro.org> + 1 other); Tue, 24 Jul 2018 14:20:02 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:44781 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388408AbeGXSUC (ORCPT <rfc822;linux-crypto@vger.kernel.org>); Tue, 24 Jul 2018 14:20:02 -0400 Received: by mail-ed1-f68.google.com with SMTP id f23-v6so4737776edr.11 for <linux-crypto@vger.kernel.org>; Tue, 24 Jul 2018 10:12:35 -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:in-reply-to:references; bh=qhx/Zni8hohoP5dPcKAraPiFZGgE5hZjWRzzfsLA36c=; b=YGJ01zABHT18CD173GrS4PCffN1tgFNKFafaQhXO6L08YzCwltVBc1JXyjaTPL3vjT cHiQtP6Q8Ul6ir5jqSRDY17DNe7mkrLiTrw4yNDhuvCnLOhiBnLSB4ZNERudeQDF8Zou i4hIJxes42sYSbMxYxQfCIyuuaqU4O0UnTlfQ= 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:in-reply-to :references; bh=qhx/Zni8hohoP5dPcKAraPiFZGgE5hZjWRzzfsLA36c=; b=CVoWWqjFJqa3QHVgzjp/T67QVYxQRUHo+z6q21LaUNjNfUpH4d4bVwQ5A+AZx6vSlN q18ceKNmZ9EtNDH83Nt2X8Xmq2RbdOdMwatwQrzk6cNs+9yAb+PFy8ZS9IFnjP6Gh2Uv sd4wXr0lalCOupRogNP4/fmX2SvK8Docy9cgQDX8L68svby33bwORv3C53v1z2as5LQL jXEtIZFJsB8i4yzy21KWeNb4BGbb468Uc2eD9NOcqYVEK3/0HhlK6y6kWN+BrLvzTo8T 3NEfV14Iz0MatF4KcbRkJ9XURd2yNz+onrmUnc2vw3aKTi9YS+P+8EI0nImSu26xib1Z 2jPg== X-Gm-Message-State: AOUpUlEamw5y9AM+bpxWM0KKBEUnsCb1Fz6bliAnAFHeiJz7iGCdpt8A SZZOYRkVElHae1/E4vdZAn5Z4u2yNLE= X-Received: by 2002:a50:c2d1:: with SMTP id u17-v6mr19818431edf.119.1532452354416; Tue, 24 Jul 2018 10:12:34 -0700 (PDT) Received: from rev02.home (b80182.upc-b.chello.nl. [212.83.80.182]) by smtp.gmail.com with ESMTPSA id j50-v6sm11267948ede.0.2018.07.24.10.12.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 10:12:33 -0700 (PDT) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, will.deacon@arm.com, dave.martin@arm.com, vakul.garg@nxp.com, bigeasy@linutronix.de, Ard Biesheuvel <ard.biesheuvel@linaro.org> Subject: [PATCH 4/4] crypto/arm64: sha2 - reduce performance impact of NEON yield checks Date: Tue, 24 Jul 2018 19:12:24 +0200 Message-Id: <20180724171224.17363-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180724171224.17363-1-ard.biesheuvel@linaro.org> References: <20180724171224.17363-1-ard.biesheuvel@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: <linux-crypto.vger.kernel.org> X-Mailing-List: linux-crypto@vger.kernel.org |
Series |
crypto/arm64: reduce impact of NEON yield checks
|
expand
|
diff --git a/arch/arm64/crypto/sha2-ce-core.S b/arch/arm64/crypto/sha2-ce-core.S index cd8b36412469..201a33ff6830 100644 --- a/arch/arm64/crypto/sha2-ce-core.S +++ b/arch/arm64/crypto/sha2-ce-core.S @@ -136,6 +136,9 @@ CPU_LE( rev32 v19.16b, v19.16b ) add dgav.4s, dgav.4s, dg0v.4s add dgbv.4s, dgbv.4s, dg1v.4s + tst w21, #0x3 // yield only every 4 blocks + b.ne 1b + /* handled all input blocks? */ cbz w21, 3f
Only perform the NEON yield check for every 4 blocks of input, to prevent taking a considerable performance hit on cores with very fast crypto instructions and comparatively slow memory accesses, such as the Cortex-A53. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm64/crypto/sha2-ce-core.S | 3 +++ 1 file changed, 3 insertions(+) -- 2.11.0