From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: panic with a message when relocation type is unknown
Date: Mon, 3 Jun 2019 07:26:08 +0200 [thread overview]
Message-ID: <3745f1b5-d321-912a-7bfc-ccc0d44ead17@pengutronix.de> (raw)
In-Reply-To: <0b7a3afb-7d49-4cf4-9086-4adb5ec317f6@pengutronix.de>
On 3/6/19 07:21, Ahmad Fatoum wrote:
>
>
> On 31/5/19 16:43, Sam Ravnborg wrote:
>> Hi Ahmad.
>>
>> On Fri, May 31, 2019 at 11:02:23AM +0200, Ahmad Fatoum wrote:
>>> Currently such failures result in a
>>>
>>> >00000000 00000000
>>>
>>> ### ERROR ### Please RESET the board ###
>>>
>>> With this patch this now becomes
>>>
>>> >00000000 00000000
>>> Unknown relocation type
>>> ### ERROR ### Please RESET the board ###
>>>
>>> which improves user experience a little bit.
>>>
>>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>>> ---
>>> arch/arm/cpu/common.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/common.c b/arch/arm/cpu/common.c
>>> index 821cafbf26c2..3668c5977ca9 100644
>>> --- a/arch/arm/cpu/common.c
>>> +++ b/arch/arm/cpu/common.c
>>> @@ -78,7 +78,7 @@ void relocate_to_current_adr(void)
>>> putc_ll(' ');
>>> puthex_ll(rel->r_addend);
>>> putc_ll('\n');
>>> - panic("");
>>> + panic("Unknown relocation type");
>>> }
>>>
>>> dstart += sizeof(*rel);
>>> @@ -108,7 +108,7 @@ void relocate_to_current_adr(void)
>>> putc_ll(' ');
>>> puthex_ll(rel->r_offset);
>>> putc_ll('\n');
>>> - panic("");
>>> + panic("Unknown relocation type");
>>
>> If you added just a little bit more context then grepping the source
>> for the error message would only result in one hit.
>>
>> Like:
>> "Unknown relocation type (addend)"
>> "Unknown relocation type (offset)"
>
> Good idea. Will do in v2.
Oh, looking at the full source, it's not really needed. The first panic
is guarded by a #if defined(CONFIG_CPU_64) and the other by
#elif defined(CONFIG_CPU_32).
>
>>
>> Or something like that.
>>
>> Sam
>>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-06-03 5:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 9:02 Ahmad Fatoum
2019-05-31 14:43 ` Sam Ravnborg
2019-06-03 5:21 ` Ahmad Fatoum
2019-06-03 5:26 ` Ahmad Fatoum [this message]
2019-05-31 18:56 ` Andrey Smirnov
2019-06-03 13:03 ` Ahmad Fatoum
2019-06-04 6:10 ` Andrey Smirnov
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=3745f1b5-d321-912a-7bfc-ccc0d44ead17@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox