Commit f037acb4 authored by Heiko Carstens's avatar Heiko Carstens

s390/stack: merge empty stack frame slots

Merge empty1 and empty2 arrays within the stack frame to one single
array. This is possible since with commit 42b01a55 ("s390: always
use the packed stack layout") the alternative stack frame layout is
gone.
Reviewed-by: default avatarNico Boehr <nrb@linux.ibm.com>
Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent d144182e
...@@ -39,8 +39,7 @@ static inline bool on_stack(struct stack_info *info, ...@@ -39,8 +39,7 @@ static inline bool on_stack(struct stack_info *info,
* Kernel uses the packed stack layout (-mpacked-stack). * Kernel uses the packed stack layout (-mpacked-stack).
*/ */
struct stack_frame { struct stack_frame {
unsigned long empty1[5]; unsigned long empty[9];
unsigned int empty2[8];
unsigned long gprs[10]; unsigned long gprs[10];
unsigned long back_chain; unsigned long back_chain;
}; };
......
...@@ -57,11 +57,11 @@ int main(void) ...@@ -57,11 +57,11 @@ int main(void)
/* stack_frame offsets */ /* stack_frame offsets */
OFFSET(__SF_BACKCHAIN, stack_frame, back_chain); OFFSET(__SF_BACKCHAIN, stack_frame, back_chain);
OFFSET(__SF_GPRS, stack_frame, gprs); OFFSET(__SF_GPRS, stack_frame, gprs);
OFFSET(__SF_EMPTY, stack_frame, empty1[0]); OFFSET(__SF_EMPTY, stack_frame, empty[0]);
OFFSET(__SF_SIE_CONTROL, stack_frame, empty1[1]); OFFSET(__SF_SIE_CONTROL, stack_frame, empty[1]);
OFFSET(__SF_SIE_SAVEAREA, stack_frame, empty1[2]); OFFSET(__SF_SIE_SAVEAREA, stack_frame, empty[2]);
OFFSET(__SF_SIE_REASON, stack_frame, empty1[3]); OFFSET(__SF_SIE_REASON, stack_frame, empty[3]);
OFFSET(__SF_SIE_FLAGS, stack_frame, empty1[4]); OFFSET(__SF_SIE_FLAGS, stack_frame, empty[4]);
DEFINE(STACK_FRAME_OVERHEAD, sizeof(struct stack_frame)); DEFINE(STACK_FRAME_OVERHEAD, sizeof(struct stack_frame));
BLANK(); BLANK();
/* idle data offsets */ /* idle data offsets */
......
...@@ -30,7 +30,7 @@ static struct kvm_s390_sie_block *sie_block(struct pt_regs *regs) ...@@ -30,7 +30,7 @@ static struct kvm_s390_sie_block *sie_block(struct pt_regs *regs)
if (!stack) if (!stack)
return NULL; return NULL;
return (struct kvm_s390_sie_block *)stack->empty1[1]; return (struct kvm_s390_sie_block *)stack->empty[1];
} }
static bool is_in_guest(struct pt_regs *regs) static bool is_in_guest(struct pt_regs *regs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment