From patchwork Mon Dec 4 12:26:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120529 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4366208qgn; Mon, 4 Dec 2017 04:27:59 -0800 (PST) X-Google-Smtp-Source: AGs4zMb4vb8ssqe6Jz1bpyi9OTKjJVxw6zWmQ+QGOuuuK5806b9YekE03jOolgaAwDW8ETPdp1M9 X-Received: by 10.98.34.199 with SMTP id p68mr18884834pfj.241.1512390479184; Mon, 04 Dec 2017 04:27:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512390479; cv=none; d=google.com; s=arc-20160816; b=j37bAL8zxmhVzIhoYvQWCRsZuVwY2QSKii54Rj57T4tleOMqQy9zIX3vc0bDGO4otQ Oj14rutDDmXURM9bpefI3aUvrl5KGaCBr0TUShGJOydbkui79MlzdBNb4ltWj3mNzp+T VeIdTbdjDOMM+dI4WsX5LevfkSrXHN/t1mL4i7Ew1fpNf+mOKlzB31wfNS/2KzM+sUQC x6PyVp61JWAXqH9i+v2jLkWA1KcBOZgD5FZhVKkUOwwDNAEVxNtJfPhDtrs3svdzcxZW l6awfl19Ff3uilgIu+bGxYXzYfskcI42u4v8Vj8AVjKYrmUMFEVwRFyZFw3vECLIEc1V 9bZg== 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=arXJNApVQbRqsJtEXEU4ElRIxKEij2SYssrNrwgjBp4=; b=I9wSSZVQ3ZenVsXPOHFzMXhgFfw36njD+0Ebb+n5DTJSsAbEm+UpstBUreKuscFfGy TjlwZf/Q+jP6XtoY6+JMbysglDoKnqIhq6Nqx6cULYSWqoykhnYi1FEpjuYkE6L0Oflm Nf2oZb91/5zk92BVRhKo+2gehIiBhG9cD9TujFENMes0xm/l59wA0u8mm1WuZrKsPLy3 NNDfIFSyrpAgKD1BDz921a7zyDjSp42bQxZtGdFKXKTg7iNk6Mcn09teclhroj/b9Luw nFZgd8BZPvZji5CtD37etMGnF+bY6e7BleBfmTa3PxhDDnOJB2dGaZLW81nPgUYz8IRT afQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=eoow5lxK; 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 d23si10177768pfe.339.2017.12.04.04.27.58; Mon, 04 Dec 2017 04:27:59 -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=eoow5lxK; 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 S1753343AbdLDM16 (ORCPT + 4 others); Mon, 4 Dec 2017 07:27:58 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:46747 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753323AbdLDM1z (ORCPT ); Mon, 4 Dec 2017 07:27:55 -0500 Received: by mail-wm0-f65.google.com with SMTP id r78so5471451wme.5 for ; Mon, 04 Dec 2017 04:27:54 -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=CDqEoFXgaOPGIYC3Blkw2ssZUZwuKZ0dxmXYLNCDFEs=; b=eoow5lxKLSn8XJ6vBkVFpJ2/7re+PqwsrKlx8dy/8SsVd6FqPBR9V3vJaJJgEzs/76 ohPu4T3gz91F2F0bERCAN07nmHftl9yMBS/h1yYeMil9ZsygkYYjCsbrCNnfjlIqvL/C YaC4RDTta7OJYrdIJ2YVnW+Wpyhx2alwOc7Q0= 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=CDqEoFXgaOPGIYC3Blkw2ssZUZwuKZ0dxmXYLNCDFEs=; b=fz/YmctcezC7VBQ6LRDXKK7ADUYivAzePTVlI8iGlgRdinplScByVq/Hxm7piJge8t /xcVU9hyds7TSbl/e7rrWrq7Ka5EgS9GVmPK9sSxrlp+3OW6M7b1i6JRcK6Jl/Mq7GNZ M6siaQSrbe7pcxteDZxpCyaZYTEEWk5z0w3FpZjgTSBD2VxW5Llcmf4IpXcWREzW4pBV lGX0rB1OVJ0P49jyDt4XcBs2YGdfKhmdydRNw0vCSBcKnM9kYOMjmcYn/d0Us8OqLUrq 24GhVmd9tMOhK5JmqeBIrRg0tcfr/4pACDOc3XZ6tKKgLLWIlB8dKPIQSdm3EYyOlZJH OkyQ== X-Gm-Message-State: AKGB3mIExy2unNvRsTIDO7NwLKA9HgpJPZckjpVTtg59JBQgH4SI7zn/ sd94DNhILNnZEaNA8Cy3g0yeAg== X-Received: by 10.28.220.215 with SMTP id t206mr2884614wmg.75.1512390473876; Mon, 04 Dec 2017 04:27:53 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id a8sm7665839wmh.41.2017.12.04.04.27.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 04:27:53 -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 v2 19/19] DO NOT MERGE Date: Mon, 4 Dec 2017 12:26:45 +0000 Message-Id: <20171204122645.31535-20-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171204122645.31535-1-ard.biesheuvel@linaro.org> References: <20171204122645.31535-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 917b026d3e00..dfee20246592 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -549,6 +549,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 4444: #endif .subsection 1 @@ -558,6 +559,38 @@ alternative_else_nop_endif .macro yield_neon_post, lbl:req 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 b \lbl .previous .endm