From patchwork Sat Mar 10 15:22:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 131313 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp2245312lja; Sat, 10 Mar 2018 07:23:44 -0800 (PST) X-Google-Smtp-Source: AG47ELscLl+bi1G6zLTyTNSK9Lc1hdR5L1TtGqoYFi/y9twp/+6sv4xacaPfB1wgMVeErL5FFRU7 X-Received: by 2002:a17:902:7d17:: with SMTP id z23-v6mr2365471pll.237.1520695424552; Sat, 10 Mar 2018 07:23:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520695424; cv=none; d=google.com; s=arc-20160816; b=p86r2KXWEK4oRn80SqC4eRBw/pdC2TsdSR+0QCRgtQHuojUl7R6TZIiQMwlkKr+BYA XhVp9bKJc1k3I5Haj6q1o9ggCBnoTv4aLUsZ1CdIHyE040f6F1ZgaCQNnfXKp9lFDbEU /kyDTl7KYeG+Dju/8GxeNLCjB2aG83KQovnyOcgPSJJmzI+cQR063hM20+NV9Bfr1Jkb EfnU/jm5tctT8h0z1TYYMUqf9eC0D020ViyrUXAaH7lgy1zypGvq2P7o6lbCO5wRbsI9 Fe0Rect73UK6Tw7q8FYncQF/+5xrKPGyyXNAgCybgvRhE4AXMBXjpn/0GNVZsxDFRu2/ si9g== 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=uxjzQNLyWXAWnhASbAVqAn408zF7GfxLtktok/ozjG4=; b=mKf4y+LRlEoPZiavP6hQd4WQxvYZfSOSMpdCqLYFRR/l60ApfRjuvLDTZ91dN+/u4Z S+trXQ64o42U8JWpk1KYZHL2ZYmwuFmUElOUnOUm2Vs94g+2bRs2T4XH1q3iU4ky2V6D Wg1NDzJh5xreYvGBPf/i6R12LCsTSV0NGyA3p0tctIAZuaNkKzh+Pk3k33Sxfr3ZrZt8 QSWdFvWITHgdPAEM9aGwcOU+b8NYMY6HsYE9Knnjb3KIQxJTfkI+wn9mDtQ4/DuTfnNS 1fUhrVCzAudGweDGAFBFhdYvsFybP2zsxq8drgnUircw3g34Rdt2JWer8kuFA6ctzHgo 5LPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kVBFaH+c; spf=pass (google.com: best guess record for domain of linux-rt-users-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-rt-users-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16si2824191pfg.221.2018.03.10.07.23.44; Sat, 10 Mar 2018 07:23:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-rt-users-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kVBFaH+c; spf=pass (google.com: best guess record for domain of linux-rt-users-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-rt-users-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932383AbeCJPXm (ORCPT + 4 others); Sat, 10 Mar 2018 10:23:42 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:36523 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932354AbeCJPXl (ORCPT ); Sat, 10 Mar 2018 10:23:41 -0500 Received: by mail-wr0-f195.google.com with SMTP id v111so11653187wrb.3 for ; Sat, 10 Mar 2018 07:23:40 -0800 (PST) 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=J3yIC47FNsulB0QXNdmsvbsH2sCTyn6D7td1rJviiJE=; b=kVBFaH+cLGoUBq8W8bAVnlrJGNI2dfw4BPlZ2L5ceMFHqBzVfb/HsiFbDBDTyq7G76 0jKnoSwrpGzHaOlFLUfe0Huzpf9fxbu2P+HauymHwjiUA83ZOhmcFKw1MvUwm3JBOQmU IU88r9h+oozzXoHQoCXzFoEUz00d5boKy2FO4= 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=J3yIC47FNsulB0QXNdmsvbsH2sCTyn6D7td1rJviiJE=; b=huOPXFtlatZOVKW9nic5GN+Mkaut0qXknbxV+Q0t5R7EAgKtWrHSX+d8gD5gKiSq2A LnZ7QsWRojeV6QsBdsW6ZojtkH9ugtAYQeo83NdBYcdP2QQWAYKBFf5E4yHDvfdjtNmZ Y8gWyRNmiEybX2LiCRu/SyVmWUlriCnbZFb8gVv6PYWDvhYLXJp0XRH4QzFXhw2NfxPm okd8PihRCDIknFavvgHxrbJIG19JubpcpzfIN5tbw3WaRyxnMntUhwUikqqcpTTNbGPX h+ZKSaOwEbGtJmB1mSi9JikL0AjL+vUYYSAJeK6rxyDwLvIlFxFAVDcKhBV4xpz4vWJK SvTQ== X-Gm-Message-State: AElRT7GVzdD+eHgo7GWRNXpuTo6KazSj4hQxBFa/186pehigr5eRBkPI zZooVHg0h42gP6AXzUa3YNN/hw== X-Received: by 10.223.142.21 with SMTP id n21mr1929804wrb.85.1520695419968; Sat, 10 Mar 2018 07:23:39 -0800 (PST) Received: from localhost.localdomain ([105.148.128.186]) by smtp.gmail.com with ESMTPSA id m9sm7027531wrf.13.2018.03.10.07.23.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 07:23:39 -0800 (PST) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Dave Martin , Russell King - ARM Linux , Sebastian Andrzej Siewior , Mark Rutland , linux-rt-users@vger.kernel.org, Peter Zijlstra , Catalin Marinas , Will Deacon , Steven Rostedt , Thomas Gleixner Subject: [PATCH v5 23/23] DO NOT MERGE Date: Sat, 10 Mar 2018 15:22:08 +0000 Message-Id: <20180310152208.10369-24-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180310152208.10369-1-ard.biesheuvel@linaro.org> References: <20180310152208.10369-1-ard.biesheuvel@linaro.org> Sender: linux-rt-users-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org Test code to force a kernel_neon_end+begin sequence at every yield point, and wipe the entire NEON state before resuming the algorithm. --- arch/arm64/include/asm/assembler.h | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index 61168cbe9781..b471b0bbdfe6 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -678,6 +678,7 @@ alternative_else_nop_endif cmp w1, #PREEMPT_DISABLE_OFFSET csel x0, x0, xzr, eq tbnz x0, #TIF_NEED_RESCHED, .Lyield_\@ // needs rescheduling? + b .Lyield_\@ #endif /* fall through to endif_yield_neon */ .subsection 1 @@ -687,6 +688,38 @@ alternative_else_nop_endif .macro do_cond_yield_neon bl kernel_neon_end bl kernel_neon_begin + movi v0.16b, #0x55 + movi v1.16b, #0x55 + movi v2.16b, #0x55 + movi v3.16b, #0x55 + movi v4.16b, #0x55 + movi v5.16b, #0x55 + movi v6.16b, #0x55 + movi v7.16b, #0x55 + movi v8.16b, #0x55 + movi v9.16b, #0x55 + movi v10.16b, #0x55 + movi v11.16b, #0x55 + movi v12.16b, #0x55 + movi v13.16b, #0x55 + movi v14.16b, #0x55 + movi v15.16b, #0x55 + movi v16.16b, #0x55 + movi v17.16b, #0x55 + movi v18.16b, #0x55 + movi v19.16b, #0x55 + movi v20.16b, #0x55 + movi v21.16b, #0x55 + movi v22.16b, #0x55 + movi v23.16b, #0x55 + movi v24.16b, #0x55 + movi v25.16b, #0x55 + movi v26.16b, #0x55 + movi v27.16b, #0x55 + movi v28.16b, #0x55 + movi v29.16b, #0x55 + movi v30.16b, #0x55 + movi v31.16b, #0x55 .endm .macro endif_yield_neon, lbl