Skip to content

Commit f037acb

Browse files
committed
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 42b01a5 ("s390: always use the packed stack layout") the alternative stack frame layout is gone. Reviewed-by: Nico Boehr <[email protected]> Reviewed-by: Alexander Gordeev <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent d144182 commit f037acb

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

arch/s390/include/asm/stacktrace.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ static inline bool on_stack(struct stack_info *info,
3939
* Kernel uses the packed stack layout (-mpacked-stack).
4040
*/
4141
struct stack_frame {
42-
unsigned long empty1[5];
43-
unsigned int empty2[8];
42+
unsigned long empty[9];
4443
unsigned long gprs[10];
4544
unsigned long back_chain;
4645
};

arch/s390/kernel/asm-offsets.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ int main(void)
5757
/* stack_frame offsets */
5858
OFFSET(__SF_BACKCHAIN, stack_frame, back_chain);
5959
OFFSET(__SF_GPRS, stack_frame, gprs);
60-
OFFSET(__SF_EMPTY, stack_frame, empty1[0]);
61-
OFFSET(__SF_SIE_CONTROL, stack_frame, empty1[1]);
62-
OFFSET(__SF_SIE_SAVEAREA, stack_frame, empty1[2]);
63-
OFFSET(__SF_SIE_REASON, stack_frame, empty1[3]);
64-
OFFSET(__SF_SIE_FLAGS, stack_frame, empty1[4]);
60+
OFFSET(__SF_EMPTY, stack_frame, empty[0]);
61+
OFFSET(__SF_SIE_CONTROL, stack_frame, empty[1]);
62+
OFFSET(__SF_SIE_SAVEAREA, stack_frame, empty[2]);
63+
OFFSET(__SF_SIE_REASON, stack_frame, empty[3]);
64+
OFFSET(__SF_SIE_FLAGS, stack_frame, empty[4]);
6565
DEFINE(STACK_FRAME_OVERHEAD, sizeof(struct stack_frame));
6666
BLANK();
6767
/* idle data offsets */

arch/s390/kernel/perf_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static struct kvm_s390_sie_block *sie_block(struct pt_regs *regs)
3030
if (!stack)
3131
return NULL;
3232

33-
return (struct kvm_s390_sie_block *)stack->empty1[1];
33+
return (struct kvm_s390_sie_block *)stack->empty[1];
3434
}
3535

3636
static bool is_in_guest(struct pt_regs *regs)

0 commit comments

Comments
 (0)