From c8f573eccb7398d7c198e547c630351e69af5ca1 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Fri, 1 Oct 2021 13:42:08 +0200 Subject: s390/ptrace: add last_break member to pt_regs Instead of using args[0] for the value of the last breaking event address register, add a member to make things more obvious. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- arch/s390/include/asm/ptrace.h | 1 + arch/s390/kernel/dumpstack.c | 2 +- arch/s390/kernel/traps.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h index 82fc11907451..4ffa8e7f0ed3 100644 --- a/arch/s390/include/asm/ptrace.h +++ b/arch/s390/include/asm/ptrace.h @@ -96,6 +96,7 @@ struct pt_regs { }; unsigned long flags; unsigned long cr1; + unsigned long last_break; }; /* diff --git a/arch/s390/kernel/dumpstack.c b/arch/s390/kernel/dumpstack.c index db1bc00229ca..85f326e258df 100644 --- a/arch/s390/kernel/dumpstack.c +++ b/arch/s390/kernel/dumpstack.c @@ -152,7 +152,7 @@ void show_stack(struct task_struct *task, unsigned long *stack, static void show_last_breaking_event(struct pt_regs *regs) { printk("Last Breaking-Event-Address:\n"); - printk(" [<%016lx>] %pSR\n", regs->args[0], (void *)regs->args[0]); + printk(" [<%016lx>] %pSR\n", regs->last_break, (void *)regs->last_break); } void show_registers(struct pt_regs *regs) diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index bcefc2173de4..d984f0b42604 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -314,7 +314,7 @@ void noinstr __do_pgm_check(struct pt_regs *regs) if (last_break < 4096) last_break = 1; current->thread.last_break = last_break; - regs->args[0] = last_break; + regs->last_break = last_break; } if (S390_lowcore.pgm_code & 0x0200) { -- cgit v1.2.3