From patchwork Wed Dec 6 19:43:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120904 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7469409qgn; Wed, 6 Dec 2017 11:45:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMZPpJMlLaA41crmXMAYonX2IwinhqF6Ogwz+kQHGKFANDfXgGeVRB4fmlQ4PAc36edwlQd8 X-Received: by 10.99.101.1 with SMTP id z1mr12990739pgb.139.1512589515063; Wed, 06 Dec 2017 11:45:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512589515; cv=none; d=google.com; s=arc-20160816; b=fmuc++6hTGz1rATPXKmGXkIywe4v6cQSinDwa8AK1johC/SMWS8mueYdQA7TsyvlGI KMnzKbXYrfHeXSwgL6dCVclIF5pQkbeSDxVxQ8l3u4ig/ZzVm3uqPKEop+eed2UqPgWx pE2P/ykqHQqRUmLgGBkrU3W/pSKLrvgFlOR0E7qQYTX0CkWQNDSJu5aDjEE1Lja8MOn2 vg2lxAWOrJBlVXDCgG4HaMtSc9K9m3UIdvk4WkrmvilgGsmJ9MbyhudVlNkSWy87V8dI BxdipHvaNNSu59uferyWdReV5Iui1vMv1RYm0/oxvZ5RUKORAImdgEU5ZvaHlRmiFlOu x5uQ== 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=yOHq5F0sQldrOscMLdLFwmbREIDm0gUDga/IPFaHAwU=; b=U3YyzcgYB9iRvRd3FEyKLkaX0mQ3O5bHIAOmxGqlDu2mlE1Od5SvDm8eWaR/JocCK4 97bntFWk5pPH84QxsGz4d514yOELcJy5o9jrD95yGKLS1qP4YZ7Eh6OyUF6RsJZgCPQs ieNIl8mM5wJG0kobz81apm2o/g/6/8vFH6CzV4vM3y5DQhCvZBfnDDfOSQJtsFJoo0l/ pG9rVGjta5nl/BN04Y2NTHLcx+f+St4/7gVMKIuaN43lUCbqHsOm7hNNWO+EcxW7rxf4 vyb1QDIx3LeuFnzOdIPcbsX2k929YWn8++84odCVQDjyRFlG9VJiHGiyonCHcjoz9bR1 ZZUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=M8oOMDIB; 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 i16si2382524pgv.496.2017.12.06.11.45.14; Wed, 06 Dec 2017 11:45:15 -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=M8oOMDIB; 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 S1752127AbdLFTpO (ORCPT + 4 others); Wed, 6 Dec 2017 14:45:14 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35672 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752034AbdLFTo6 (ORCPT ); Wed, 6 Dec 2017 14:44:58 -0500 Received: by mail-wm0-f66.google.com with SMTP id f9so9193473wmh.0 for ; Wed, 06 Dec 2017 11:44:58 -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=Il4jJORApUVG57eL6L3+t7rXYy7wi3t835FS6Fs0UwA=; b=M8oOMDIB17slUq7gJsRk8VSsW4N5oeUHYntY9ZYq8NQiAXCv0IKwSfwWEBM2MP5mKA 6412scHYrTvFBfq62bKwtPsFeV8jRIFJUe+Fq3+0PeBv+qAjFtJQ3i3bRhy1QlZMrWbc L1nZktK95zYyv8jZ4CKFtovI+Z8lr3xgGVHko= 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=Il4jJORApUVG57eL6L3+t7rXYy7wi3t835FS6Fs0UwA=; b=hY6ZlgMpR/SpHapuwpA+D3GrCEQPYJdlxPCe9f103mYHIPFWOEP8RXLbLwVGoKzHzN z2FXKvvD2nRvmS7NtP8zPYOP+MPOKWByrEpVBdaIlIJ1czrmxerajbIZF/Z7erBh+dPb N/VvL26bSAE1OZr4rz4pm9aO0uQnrqXPxTcFsFc1yPyAfLO+MdgzUooGSNOqz+4RvZPx DRraCsHFKCfiu/hCSOIr6KLCDq6xRd5+1IQQQwDywp0iR/lWKjeGLQhSgy97Xbfv7nFs uWby15x6aRx2qvhbssqranJnn4iUg8wqZrs2fVnk2/p/obue9XYZMyor6TJG3LRMbjvg pZkg== X-Gm-Message-State: AKGB3mJ7A1aOW/kmWmZ4/eVbJ4cRaZeWEtZEqANKiJDThvzMw5TinpOK FpBkWxPgLrUj4xQmCGZW3a/WTg== X-Received: by 10.28.107.5 with SMTP id g5mr10082921wmc.125.1512589497585; Wed, 06 Dec 2017 11:44:57 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id b66sm3596594wmh.32.2017.12.06.11.44.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Dec 2017 11:44:55 -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 v3 20/20] DO NOT MERGE Date: Wed, 6 Dec 2017 19:43:46 +0000 Message-Id: <20171206194346.24393-21-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171206194346.24393-1-ard.biesheuvel@linaro.org> References: <20171206194346.24393-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.11.0 -- 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 c54e408fd5a7..7072c29b4e83 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -607,6 +607,7 @@ alternative_else_nop_endif cmp w1, #1 // == PREEMPT_OFFSET csel x0, x0, xzr, eq tbnz x0, #TIF_NEED_RESCHED, 5555f // needs rescheduling? + b 5555f #endif .subsection 1 5555: @@ -615,6 +616,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=6666f