projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85eccdd
)
crypto: api - Optimise away crypto_yield when hard preemption is on
author
Herbert Xu
<herbert@gondor.apana.org.au>
Tue, 12 Jul 2016 05:17:56 +0000
(13:17 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Mon, 18 Jul 2016 09:35:49 +0000
(17:35 +0800)
When hard preemption is enabled there is no need to explicitly
call crypto_yield. This patch eliminates it if that is the case.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/algapi.h
patch
|
blob
|
blame
|
history
diff --git
a/include/crypto/algapi.h
b/include/crypto/algapi.h
index 0483f652ac279db474d7fc51d03a20716138f325..8637cdfe382a4d8ff2542ac9ccab2170fc48546a 100644
(file)
--- a/
include/crypto/algapi.h
+++ b/
include/crypto/algapi.h
@@
-442,8
+442,10
@@
static inline int crypto_memneq(const void *a, const void *b, size_t size)
static inline void crypto_yield(u32 flags)
{
+#if !defined(CONFIG_PREEMPT) || defined(CONFIG_PREEMPT_VOLUNTARY)
if (flags & CRYPTO_TFM_REQ_MAY_SLEEP)
cond_resched();
+#endif
}
#endif /* _CRYPTO_ALGAPI_H */