All of lore.kernel.org
 help / color / mirror / Atom feed
From: julien.thierry@arm.com (Julien Thierry)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Decode information from ESR upon mem faults
Date: Thu, 29 Jun 2017 09:58:12 +0100	[thread overview]
Message-ID: <42862eff-5e90-31c7-46d7-0270d4ac8e08@arm.com> (raw)
In-Reply-To: <20170619171305.GA12786@arm.com>

Hi Will,

On 19/06/17 18:13, Will Deacon wrote:
> On Wed, Jun 14, 2017 at 02:14:03PM +0100, Julien Thierry wrote:
>> When receiving unhandled faults from the CPU, description is very sparse.
>> Adding information about faults decoded from ESR.
>>
>> Added defines to esr.h corresponding ESR fields. Values are based on ARM
>> Archtecture Reference Manual (DDI 0487B.a), section D7.2.28 ESR_ELx, Exception
>> Syndrome Register (ELx) (pages D7-2275 to D7-2280).
>>
>> New output is of the form:
>> [  122.109118] Mem abort info:
>> [  122.111884]   Exception class = DABT (current EL)
>> [  122.116564]   IL = 32 bits
>> [  122.119242]   SET = 0
>> [  122.121507]   FnV = 0
>> [  122.123754]   EA = 0
>> [  122.125928]   S1PTW = 0
>> [  122.128347] Data abort info:
>> [  122.131212]   ISS[23:14] invalid
> 
> Is it still worth printing the ISS value here? I'm wondering about the
> case where an old kernel runs on a new CPU and gets an abort that was
> previously undefined.
> 

The ISS is part of the ESR which should is be printed as part of the 
fault message, I am not sure reprinting just ESR[23:14] raw value would
provide much more help.

>> [  122.134417]   CM = 0
>> [  122.136589]   WnR = 1
> 
> Hmm, this might get really confusing if multiple CPUs end up with their
> prints interleaved. Perhaps having a print_unhandled_fault_info helper that
> takes a prefix string (e.g. "Unhandled fault") and constructs the
> information on one line would be preferable?
> 
> Then again, you could make the same argument about multi-line register
> dumps, so perhaps I'm worrying too much here. Thoughts?

As you mentioned, this is similar to the register dump and now that I 
look at it, registers are more grouped (2-3 per line). Maybe we could 
keep the debug info on multiple lines but grouping a bit more instead of 
having 1 field per line:

[  122.109118] Mem abort info:
[  122.111884]   Exception class = DABT (current EL), IL = 32 bits, SET = 0
[  122.121507]   FnV = 0, EA = 0, S1PTW = 0
[  122.128347] Data abort info:
[  122.131212]   ISS[23:14] invalid
[  122.134417]   CM = 0, WnR = 1

When ISS is not invalid, it's fields could be printed on the same line.

I think it would keep the code simple and the debug info readable. There 
would be less lines to interleave although that issue would not be 
completely solved.

Otherwise, maybe we could prefix the lines with a cpu id in order to be 
able to distinguish interleaved debug infos? But that could be done as 
well for the register dumps if this is necessary.

Opinions on the matter?

Thanks,

-- 
Julien Thierry

  reply	other threads:[~2017-06-29  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 13:14 [PATCH] arm64: Decode information from ESR upon mem faults Julien Thierry
2017-06-19 17:13 ` Will Deacon
2017-06-29  8:58   ` Julien Thierry [this message]
2017-07-11 17:57     ` Will Deacon

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=42862eff-5e90-31c7-46d7-0270d4ac8e08@arm.com \
    --to=julien.thierry@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.