s390: clean up stacks setup
Replace hard coded stack frame overhead values with STACK_FRAME_OVERHEAD definition. Avoid unnecessary arithmetic instructions. Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
26f4414a45
commit
4e62d45885
@@ -14,6 +14,7 @@
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
__HEAD
|
||||
ENTRY(startup_continue)
|
||||
@@ -35,10 +36,9 @@ ENTRY(startup_continue)
|
||||
#
|
||||
larl %r14,init_task
|
||||
stg %r14,__LC_CURRENT
|
||||
larl %r15,init_thread_union
|
||||
aghi %r15,1<<(PAGE_SHIFT+THREAD_SIZE_ORDER) # init_task_union + THREAD_SIZE
|
||||
larl %r15,init_thread_union+THREAD_SIZE
|
||||
stg %r15,__LC_KERNEL_STACK # set end of kernel stack
|
||||
aghi %r15,-160
|
||||
aghi %r15,-STACK_FRAME_OVERHEAD
|
||||
#
|
||||
# Early setup functions that may not rely on an initialized bss section,
|
||||
# like moving the initrd. Returns with an initialized bss section.
|
||||
|
@@ -197,9 +197,7 @@ pgm_check_entry:
|
||||
brc 2,3b /* busy, try again */
|
||||
|
||||
/* Suspend CPU not available -> panic */
|
||||
larl %r15,init_thread_union
|
||||
aghi %r15,1<<(PAGE_SHIFT+THREAD_SIZE_ORDER)
|
||||
aghi %r15,-STACK_FRAME_OVERHEAD
|
||||
larl %r15,init_thread_union+THREAD_SIZE-STACK_FRAME_OVERHEAD
|
||||
larl %r2,.Lpanic_string
|
||||
brasl %r14,sclp_early_printk_force
|
||||
larl %r3,.Ldisabled_wait_31
|
||||
|
Reference in New Issue
Block a user