projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc47ad4
)
powerpc/32: indirect function call use bctrl rather than blrl in ret_from_kernel_thread
author
Christophe Leroy
<christophe.leroy@csgroup.eu>
Fri, 20 Aug 2021 05:16:05 +0000
(
05:16
+0000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Wed, 25 Aug 2021 03:35:47 +0000
(13:35 +1000)
Copied from commit
89bbe4c798bc
("powerpc/64: indirect function call
use bctrl rather than blrl in ret_from_kernel_thread")
blrl is not recommended to use as an indirect function call, as it may
corrupt the link stack predictor.
This is not a performance critical path but this should be fixed for
consistency.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/91b1d242525307ceceec7ef6e832bfbacdd4501b.1629436472.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/entry_32.S
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/entry_32.S
b/arch/powerpc/kernel/entry_32.S
index
0273a13
..
61fdd53
100644
(file)
--- a/
arch/powerpc/kernel/entry_32.S
+++ b/
arch/powerpc/kernel/entry_32.S
@@
-161,10
+161,10
@@
ret_from_fork:
ret_from_kernel_thread:
REST_NVGPRS(r1)
bl schedule_tail
- mt
lr
r14
+ mt
ctr
r14
mr r3,r15
PPC440EP_ERR42
- b
l
rl
+ b
ct
rl
li r3,0
b ret_from_syscall