arm64: assembler: add macros to conditionally yield the NEON under PREEMPT
commit24534b3511828c66215fdf1533d77a7bf2e1fdb2
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 29 Mar 2018 13:13:23 +0000 (29 15:13 +0200)
committerWill Deacon <will.deacon@arm.com>
Wed, 11 Apr 2018 17:50:34 +0000 (11 18:50 +0100)
tree8a100f7e48055190fd75a35a1e68cd6c6f8c3f82
parent0f468e221c3ae89d2fbe611a1a69ee554188519a
arm64: assembler: add macros to conditionally yield the NEON under PREEMPT

Add support macros to conditionally yield the NEON (and thus the CPU)
that may be called from the assembler code.

In some cases, yielding the NEON involves saving and restoring a non
trivial amount of context (especially in the CRC folding algorithms),
and so the macro is split into three, and the code in between is only
executed when the yield path is taken, allowing the context to be preserved.
The third macro takes an optional label argument that marks the resume
path after a yield has been performed.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/assembler.h
arch/arm64/kernel/asm-offsets.c