powerpc/64: Allow for THREAD_SIZE > 16k
authorHamish Martin <hamish.martin@alliedtelesis.co.nz>
Fri, 24 Feb 2017 00:52:10 +0000 (13:52 +1300)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 20 Mar 2017 08:02:49 +0000 (19:02 +1100)
Fix an assembler error when the THREAD_SIZE is greater than 16k.

Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/head_64.S

index 1dc5eae2ced3ad011bfa094c2e66b5a099ddf853..0ddc602b33a4dcad12e935c197a5f944617e5935 100644 (file)
@@ -949,7 +949,8 @@ start_here_multiplatform:
        LOAD_REG_ADDR(r3,init_thread_union)
 
        /* set up a stack pointer */
-       addi    r1,r3,THREAD_SIZE
+       LOAD_REG_IMMEDIATE(r1,THREAD_SIZE)
+       add     r1,r3,r1
        li      r0,0
        stdu    r0,-STACK_FRAME_OVERHEAD(r1)