diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2021-02-10 07:20:35 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-02-10 07:20:35 +0100 |
commit | dc9ab9c69c197a602d6d619d500ab6f291573f07 (patch) | |
tree | b6c44d4d852a3c416722f15d5b05a809f0c6d6fe /arch/arm64 | |
parent | crypto: crypto4xx - Avoid linking failure with HW_RANDOM=m (diff) | |
parent | arm64: assembler: add cond_yield macro (diff) | |
download | linux-dc9ab9c69c197a602d6d619d500ab6f291573f07.tar.xz linux-dc9ab9c69c197a602d6d619d500ab6f291573f07.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux for-next/crypto
Pull change from arm64 tree that's needed for crypto arm changes.
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/include/asm/assembler.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index bf125c591116..27b1ea721c2d 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler.h @@ -745,6 +745,22 @@ USER(\label, ic ivau, \tmp2) // invalidate I line PoU .Lyield_out_\@ : .endm + /* + * Check whether preempt-disabled code should yield as soon as it + * is able. This is the case if re-enabling preemption a single + * time results in a preempt count of zero, and the TIF_NEED_RESCHED + * flag is set. (Note that the latter is stored negated in the + * top word of the thread_info::preempt_count field) + */ + .macro cond_yield, lbl:req, tmp:req +#ifdef CONFIG_PREEMPTION + get_current_task \tmp + ldr \tmp, [\tmp, #TSK_TI_PREEMPT] + sub \tmp, \tmp, #PREEMPT_DISABLE_OFFSET + cbz \tmp, \lbl +#endif + .endm + /* * This macro emits a program property note section identifying * architecture features which require special handling, mainly for |