From: Stafford Horne <shorne@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linux OpenRISC <linux-openrisc@vger.kernel.org>,
Stafford Horne <shorne@gmail.com>,
Jonas Bonn <jonas@southpole.se>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Subject: [PATCH 2/5] openrisc: traps: Remove calls to show_registers before die
Date: Thu, 11 Apr 2024 19:06:29 +0100 [thread overview]
Message-ID: <20240411180644.2023991-3-shorne@gmail.com> (raw)
In-Reply-To: <20240411180644.2023991-1-shorne@gmail.com>
The die function calls show_registers unconditionally. Remove calls to
show_registers before calling die to avoid printing all registers and
stack status two times during a crash.
This was found when testing kernel trap and floating point exception
handling.
Signed-off-by: Stafford Horne <shorne@gmail.com>
---
arch/openrisc/kernel/traps.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c
index 6d0fee912747..88fe27e4c10c 100644
--- a/arch/openrisc/kernel/traps.c
+++ b/arch/openrisc/kernel/traps.c
@@ -212,7 +212,6 @@ asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address)
force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)address);
} else {
pr_emerg("KERNEL: Unaligned Access 0x%.8lx\n", address);
- show_registers(regs);
die("Die:", regs, address);
}
@@ -225,7 +224,6 @@ asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address)
force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address);
} else { /* Kernel mode */
pr_emerg("KERNEL: Bus error (SIGBUS) 0x%.8lx\n", address);
- show_registers(regs);
die("Die:", regs, address);
}
}
@@ -421,7 +419,6 @@ asmlinkage void do_illegal_instruction(struct pt_regs *regs,
} else { /* Kernel mode */
pr_emerg("KERNEL: Illegal instruction (SIGILL) 0x%.8lx\n",
address);
- show_registers(regs);
die("Die:", regs, address);
}
}
--
2.44.0
next prev parent reply other threads:[~2024-04-11 18:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 18:06 [PATCH 0/5] OpenRISC FPU and Signal handling fixups Stafford Horne
2024-04-11 18:06 ` [PATCH 1/5] openrisc: traps: Convert printks to pr_<level> macros Stafford Horne
2024-04-11 18:06 ` Stafford Horne [this message]
2024-04-11 18:06 ` [PATCH 3/5] openrisc: traps: Don't send signals to kernel mode threads Stafford Horne
2024-04-11 18:06 ` [PATCH 4/5] openrisc: Add FPU config Stafford Horne
2024-04-11 18:06 ` [PATCH 5/5] openrisc: Move FPU state out of pt_regs Stafford Horne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240411180644.2023991-3-shorne@gmail.com \
--to=shorne@gmail.com \
--cc=jonas@southpole.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-openrisc@vger.kernel.org \
--cc=stefan.kristiansson@saunalahti.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).