aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/misc_32.S
diff options
context:
space:
mode:
authorGravatar Christophe Leroy <christophe.leroy@c-s.fr> 2019-01-31 10:09:00 +0000
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2019-02-23 22:31:40 +1100
commita7916a1de526162d73e894b6d3ebd895d4302078 (patch)
treed34624a17b6475cc0e45bafdde2c6d51b6a70626 /arch/powerpc/kernel/misc_32.S
parentpowerpc: Activate CONFIG_THREAD_INFO_IN_TASK (diff)
downloadlinux-a7916a1de526162d73e894b6d3ebd895d4302078.tar.gz
linux-a7916a1de526162d73e894b6d3ebd895d4302078.tar.bz2
linux-a7916a1de526162d73e894b6d3ebd895d4302078.zip
powerpc: regain entire stack space
thread_info is not anymore in the stack, so the entire stack can now be used. There is also no risk anymore of corrupting task_cpu(p) with a stack overflow so the patch removes the test. When doing this, an explicit test for NULL stack pointer is needed in validate_sp() as it is not anymore implicitely covered by the sizeof(thread_info) gap. In the meantime, with the previous patch all pointers to the stacks are not anymore pointers to thread_info so this patch changes them to void* Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/misc_32.S')
-rw-r--r--arch/powerpc/kernel/misc_32.S6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index b37b50fde828..6f6127c3760c 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -46,11 +46,10 @@ _GLOBAL(call_do_softirq)
mflr r0
stw r0,4(r1)
lwz r10,THREAD+KSP_LIMIT(r2)
- addi r11,r3,THREAD_INFO_GAP
+ stw r3, THREAD+KSP_LIMIT(r2)
stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r3)
mr r1,r3
stw r10,8(r1)
- stw r11,THREAD+KSP_LIMIT(r2)
bl __do_softirq
lwz r10,8(r1)
lwz r1,0(r1)
@@ -66,11 +65,10 @@ _GLOBAL(call_do_irq)
mflr r0
stw r0,4(r1)
lwz r10,THREAD+KSP_LIMIT(r2)
- addi r11,r4,THREAD_INFO_GAP
+ stw r4, THREAD+KSP_LIMIT(r2)
stwu r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r4)
mr r1,r4
stw r10,8(r1)
- stw r11,THREAD+KSP_LIMIT(r2)
bl __do_irq
lwz r10,8(r1)
lwz r1,0(r1)