openrisc: head: use THREAD_SIZE instead of magic constant
authorStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Wed, 8 Jan 2014 11:15:05 +0000 (13:15 +0200)
committerStafford Horne <shorne@gmail.com>
Mon, 6 Feb 2017 12:50:42 +0000 (21:50 +0900)
The stack size was hard coded to 0x2000, use the standard THREAD_SIZE
definition loaded from thread_info.h.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
[shorne@gmail.com: Added body to the commit message]
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/head.S

index 2346c5b..63ba2d9 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/page.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
+#include <asm/thread_info.h>
 #include <asm/cache.h>
 #include <asm/spr_defs.h>
 #include <asm/asm-offsets.h>
@@ -486,7 +487,8 @@ _start:
        /*
         * set up initial ksp and current
         */
-       LOAD_SYMBOL_2_GPR(r1,init_thread_union+0x2000)  // setup kernel stack
+       /* setup kernel stack */
+       LOAD_SYMBOL_2_GPR(r1,init_thread_union + THREAD_SIZE)
        LOAD_SYMBOL_2_GPR(r10,init_thread_union)        // setup current
        tophys  (r31,r10)
        l.sw    TI_KSP(r31), r1