Re: [PATCH] ARM: panic with a message when relocation type is unknown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxx>
>> ---
>>  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.

> 
> 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux