From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 20/20] DO NOT MERGE
Date: Wed, 6 Dec 2017 19:43:46 +0000 [thread overview]
Message-ID: <20171206194346.24393-21-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20171206194346.24393-1-ard.biesheuvel@linaro.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(+)
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
--
2.11.0
prev parent reply other threads:[~2017-12-06 19:43 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 19:43 [PATCH v3 00/20] crypto: arm64 - play nice with CONFIG_PREEMPT Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 01/20] crypto: testmgr - add a new test case for CRC-T10DIF Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 02/20] crypto: arm64/aes-ce-ccm - move kernel mode neon en/disable into loop Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 03/20] crypto: arm64/aes-blk " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 04/20] crypto: arm64/aes-bs " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 05/20] crypto: arm64/chacha20 " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 06/20] crypto: arm64/aes-blk - remove configurable interleave Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 07/20] crypto: arm64/aes-blk - add 4 way interleave to CBC encrypt path Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 08/20] crypto: arm64/aes-blk - add 4 way interleave to CBC-MAC " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 09/20] crypto: arm64/sha256-neon - play nice with CONFIG_PREEMPT kernels Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 10/20] arm64: assembler: add utility macros to push/pop stack frames Ard Biesheuvel
2017-12-07 14:11 ` Dave Martin
2017-12-07 14:21 ` Ard Biesheuvel
2017-12-07 14:53 ` Dave Martin
2017-12-07 14:58 ` Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 11/20] arm64: assembler: add macros to conditionally yield the NEON under PREEMPT Ard Biesheuvel
2017-12-07 14:39 ` Dave Martin
2017-12-07 14:50 ` Ard Biesheuvel
2017-12-07 15:47 ` Ard Biesheuvel
2017-12-07 15:51 ` Ard Biesheuvel
2017-12-07 16:15 ` Dave Martin
2017-12-07 16:11 ` Dave Martin
2017-12-06 19:43 ` [PATCH v3 12/20] crypto: arm64/sha1-ce - yield NEON after every block of input Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 13/20] crypto: arm64/sha2-ce " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 14/20] crypto: arm64/aes-ccm " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 15/20] crypto: arm64/aes-blk " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 16/20] crypto: arm64/aes-bs " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 17/20] crypto: arm64/aes-ghash " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 18/20] crypto: arm64/crc32-ce " Ard Biesheuvel
2017-12-06 19:43 ` [PATCH v3 19/20] crypto: arm64/crct10dif-ce " Ard Biesheuvel
2017-12-06 19:43 ` Ard Biesheuvel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171206194346.24393-21-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).