summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/signal.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2020-08-18 19:19:21 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2020-12-03 15:01:12 +0100
commit0ecbc6ad18e324012234183e21805423f5e0cc79 (patch)
tree7cc29253ee93805ae244cf589cc028845c33c391 /arch/powerpc/kernel/signal.c
parentpowerpc/signal: Move access_ok() out of get_sigframe() (diff)
downloadlinux-0ecbc6ad18e324012234183e21805423f5e0cc79.tar.xz
linux-0ecbc6ad18e324012234183e21805423f5e0cc79.zip
powerpc/signal: Remove get_clean_sp()
get_clean_sp() is only used once in kernel/signal.c . GCC is smart enough to see that x & 0xffffffff is a nop calculation on PPC32, no need of a special PPC32 trivial version. Include the logic from the PPC64 version of get_clean_sp() directly in get_sigframe(). Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/13ef6510ce30a4867e043157b93af5bb8c67fb3b.1597770847.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/kernel/signal.c')
-rw-r--r--arch/powerpc/kernel/signal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c
index 37372fd5b600..1297b440ae78 100644
--- a/arch/powerpc/kernel/signal.c
+++ b/arch/powerpc/kernel/signal.c
@@ -150,7 +150,10 @@ void __user *get_sigframe(struct ksignal *ksig, unsigned long sp,
unsigned long oldsp, newsp;
/* Default to using normal stack */
- oldsp = get_clean_sp(sp, is_32);
+ if (is_32)
+ oldsp = sp & 0x0ffffffffUL;
+ else
+ oldsp = sp;
oldsp = sigsp(oldsp, ksig);
newsp = (oldsp - frame_size) & ~0xFUL;