summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/thread_info.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2023-03-27 12:37:22 +0300
committerVasily Gorbik <gor@linux.ibm.com>2023-04-04 19:34:55 +0300
commitc2c3258fb55a0f51ea4a3c2cd4c29b23a64b151e (patch)
tree06bc6c83632d3988c626217143b36a304accb1e2 /arch/s390/include/asm/thread_info.h
parente6badee94027a4e9586e6b5d087bc96e9e4d554c (diff)
downloadlinux-c2c3258fb55a0f51ea4a3c2cd4c29b23a64b151e.tar.xz
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/asm/thread_info.h')
-rw-r--r--arch/s390/include/asm/thread_info.h8
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