diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-03-27 11:37:22 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2023-04-04 18:34:55 +0200 |
commit | c2c3258fb55a0f51ea4a3c2cd4c29b23a64b151e (patch) | |
tree | 06bc6c83632d3988c626217143b36a304accb1e2 /arch/s390/include | |
parent | e6badee94027a4e9586e6b5d087bc96e9e4d554c (diff) |
s390/stack: use STACK_INIT_OFFSET where possible
Make STACK_INIT_OFFSET also available for assembler code, and
use it everywhere instead of open-coding it at several places.
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/thread_info.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index f19e6f5ec367..c7c97921ed8d 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h @@ -9,6 +9,9 @@ #define _ASM_THREAD_INFO_H #include <linux/bits.h> +#ifndef ASM_OFFSETS_C +#include <asm/asm-offsets.h> +#endif /* * General size of kernel stacks @@ -21,13 +24,12 @@ #define BOOT_STACK_SIZE (PAGE_SIZE << 2) #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) +#define STACK_INIT_OFFSET (THREAD_SIZE - STACK_FRAME_OVERHEAD - __PT_SIZE) + #ifndef __ASSEMBLY__ #include <asm/lowcore.h> #include <asm/page.h> -#define STACK_INIT_OFFSET \ - (THREAD_SIZE - STACK_FRAME_OVERHEAD - sizeof(struct pt_regs)) - /* * low level task data that entry.S needs immediate access to * - this struct should fit entirely inside of one cache line |