Skip to content

Commit d1d1569

Browse files
committed
ARC: kernel stack: INIT_THREAD need not setup @init_stack in @ksp
There are 2 pointers to kernel mode stack of a task - task_struct.stack: base address of stack page (max possible stack top) - thread_info.ksp : runtime stack top in __switch_to INIT_THREAD was setting up ksp to stack base which was not really needed - it would get overwritten with dynamic value on first call to __switch_to when init is switched out for the very first time. - generic code already does init_task.stack = init_stack and ARC code uses that to retrieve task's stack base. Signed-off-by: Vineet Gupta <[email protected]>
1 parent cfca4b5 commit d1d1569

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/arc/include/asm/processor.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ struct thread_struct {
3333
#endif
3434
};
3535

36-
#define INIT_THREAD { \
37-
.ksp = sizeof(init_stack) + (unsigned long) init_stack, \
38-
}
36+
#define INIT_THREAD { }
3937

4038
/* Forward declaration, a strange C thing */
4139
struct task_struct;

0 commit comments

Comments
 (0)