From: Christophe LEROY <christophe.leroy@c-s.fr>
To: Breno Leitao <leitao@debian.org>, linuxppc-dev@lists.ozlabs.org
Cc: mikey@neuling.org
Subject: Re: [PATCH v2] powerpc/tm: Print 64-bits MSR
Date: Tue, 7 Aug 2018 19:15:11 +0200 [thread overview]
Message-ID: <95db63eb-6fb7-eed3-1ce8-8b2c053dff47@c-s.fr> (raw)
In-Reply-To: <1533648900-7933-1-git-send-email-leitao@debian.org>
Le 07/08/2018 à 15:35, Breno Leitao a écrit :
> On a kernel TM Bad thing program exception, the Machine State Register
> (MSR) is not being properly displayed. The exception code dumps a 32-bits
> value but MSR is a 64 bits register for all platforms that have HTM
> enabled.
>
> This patch dumps the MSR value as a 64-bits value instead of 32 bits. In
> order to do so, the 'reason' variable could not be used, since it trimmed
> MSR to 32-bits (int).
reason is not always regs->msr, see get_reason(), allthough in your case
it is.
I think it would be better to change 'reason' to 'unsigned long' instead
of replacing it by regs->msr for the printk.
Christophe
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> arch/powerpc/kernel/traps.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> index 0e17dcb48720..cd561fd89532 100644
> --- a/arch/powerpc/kernel/traps.c
> +++ b/arch/powerpc/kernel/traps.c
> @@ -1402,7 +1402,7 @@ void program_check_exception(struct pt_regs *regs)
> goto bail;
> } else {
> printk(KERN_EMERG "Unexpected TM Bad Thing exception "
> - "at %lx (msr 0x%x)\n", regs->nip, reason);
> + "at %lx (msr 0x%lx)\n", regs->nip, regs->msr);
> die("Unrecoverable exception", regs, SIGABRT);
> }
> }
>
next prev parent reply other threads:[~2018-08-07 17:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 0:32 [PATCH] powerpc/tm: Print 64-bits MSR Breno Leitao
2018-08-07 1:17 ` Michael Neuling
2018-08-07 13:35 ` [PATCH v2] " Breno Leitao
2018-08-07 15:50 ` Segher Boessenkool
2018-08-07 17:15 ` Christophe LEROY [this message]
2018-08-07 18:41 ` Breno Leitao
2018-08-07 18:57 ` LEROY Christophe
2018-08-08 15:50 ` Breno Leitao
2018-10-04 6:14 ` [v2] " Michael Ellerman
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=95db63eb-6fb7-eed3-1ce8-8b2c053dff47@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=leitao@debian.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.