From: Jan Kiszka <jan.kiszka@siemens.com>
To: Richard Weinberger <richard@nod.at>, xenomai@lists.linux.dev
Subject: Re: [PATCH] cobalt: Print symbolic code location upon mode switch
Date: Tue, 5 Mar 2024 16:20:44 +0100 [thread overview]
Message-ID: <f524d73e-5282-4256-ae7f-7add90312c43@siemens.com> (raw)
In-Reply-To: <20240305081815.10560-1-richard@nod.at>
On 05.03.24 09:18, Richard Weinberger wrote:
> These days the raw program counter is close to useless, do it like
> the rest of the kernel and print fn+offset [module name].
>
> Example log output after this change:
> [Xenomai] switching testx to secondary mode after exception #0 in kernel-space at test_ioctl_rt+0x14/0x20 [maptest] (pid 879)
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> kernel/cobalt/dovetail/kevents.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/cobalt/dovetail/kevents.c b/kernel/cobalt/dovetail/kevents.c
> index 817aa954dc01..f78abbdc792f 100644
> --- a/kernel/cobalt/dovetail/kevents.c
> +++ b/kernel/cobalt/dovetail/kevents.c
> @@ -65,9 +65,9 @@ void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs)
> if (!user_mode(regs)) {
> printk(XENO_WARNING
> "switching %s to secondary mode after exception #%u in "
> - "kernel-space at 0x%lx (pid %d)\n", thread->name,
> + "kernel-space at %pS (pid %d)\n", thread->name,
> trapnr,
> - xnarch_fault_pc(regs),
> + (void *)xnarch_fault_pc(regs),
> xnthread_host_pid(thread));
> } else if (xnarch_fault_notify(trapnr)) /* Don't report debug traps */
> printk(XENO_WARNING
Thanks, applied.
Jan
--
Siemens AG, Technology
Linux Expert Center
prev parent reply other threads:[~2024-03-05 15:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 8:18 [PATCH] cobalt: Print symbolic code location upon mode switch Richard Weinberger
2024-03-05 15:20 ` Jan Kiszka [this message]
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=f524d73e-5282-4256-ae7f-7add90312c43@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=richard@nod.at \
--cc=xenomai@lists.linux.dev \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).