[PATCH v2 3/5] ARM: socfpga: achilles: use ENTRY_FUNCTION_WITHSTACK

Steffen Trumtrar s.trumtrar at pengutronix.de
Mon Jul 11 00:33:59 PDT 2022


Hi!

Ahmad Fatoum <a.fatoum at pengutronix.de> writes:

> On 08.07.22 08:24, Steffen Trumtrar wrote:
>> From: Steffen Trumtrar <s.trumtrar at pengutronix.de>
>>
>> Use the newer function ENTRY_FUNCTION_WITHSTACK.
>>
>> Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
>> ---
>>  arch/arm/boards/reflex-achilles/lowlevel.c | 15 ++++++---------
>>  1 file changed, 6 insertions(+), 9 deletions(-)
>>
>> diff --git a/arch/arm/boards/reflex-achilles/lowlevel.c b/arch/arm/boards/reflex-achilles/lowlevel.c
>> index 162cd58c58..0fc94fc2b1 100644
>> --- a/arch/arm/boards/reflex-achilles/lowlevel.c
>> +++ b/arch/arm/boards/reflex-achilles/lowlevel.c
>> @@ -31,12 +31,16 @@
>>
>>  extern char __dtb_z_socfpga_arria10_achilles_start[];
>>
>> -static noinline void achilles_start(void)
>> +#define ARRIA10_STACKTOP	ARRIA10_OCRAM_ADDR + SZ_256K
>> +
>> +ENTRY_FUNCTION_WITHSTACK(start_socfpga_achilles_xload, ARRIA10_STACKTOP, r0, r1, r2)
>>  {
>>  	int pbl_index = 0;
>>  	int barebox = 0;
>>  	int bitstream = 0;
>>
>> +	arm_cpu_lowlevel_init();
>> +	arm_setup_stack(ARRIA10_OCRAM_ADDR + SZ_256K);
>
> Only safe to call in a naked function. Drop it as you are now using
> ENTRY_FUNCTION_WITHSTACK, which does setup for you.
>

Meh, yeah, that was not on purpose. Thanks for noticing. v3 incoming.


Thanks,
Steffen

--
Pengutronix e.K.                | Dipl.-Inform. Steffen Trumtrar |
Steuerwalder Str. 21            | https://www.pengutronix.de/    |
31137 Hildesheim, Germany       | Phone: +49-5121-206917-0       |
Amtsgericht Hildesheim, HRA 2686| Fax:   +49-5121-206917-5555    |



More information about the barebox mailing list