From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: ukl@pengutronix.de
Subject: Re: [PATCH 2/3] ARM: turn arm_mem_stack_top into a macro
Date: Thu, 2 Dec 2021 09:01:10 +0100 [thread overview]
Message-ID: <f1721621-fc62-7ec8-f1cb-b6659853ab22@pengutronix.de> (raw)
In-Reply-To: <20211202074256.200325-2-a.fatoum@pengutronix.de>
On 02.12.21 08:42, Ahmad Fatoum wrote:
> This makes it possible to use for static initialization, like done in a
> follow-up commit.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/include/asm/barebox-arm.h | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
> index d70de6d5e6e6..0481d3391c26 100644
> --- a/arch/arm/include/asm/barebox-arm.h
> +++ b/arch/arm/include/asm/barebox-arm.h
> @@ -97,14 +97,13 @@ static inline void arm_fixup_vectors(void)
>
> void *barebox_arm_boot_dtb(void);
>
> -static inline unsigned long arm_mem_stack_top(unsigned long membase,
> - unsigned long endmem)
> -{
> - if (IS_ENABLED(CONFIG_BOOTM_OPTEE) || IS_ENABLED(CONFIG_PBL_OPTEE))
> - endmem -= OPTEE_SIZE;
> +#define __arm_mem_stack_top(membase, endmem) ((endmem) - SZ_64K)
>
> - return endmem - SZ_64K;
> -}
> +#if defined(CONFIG_BOOTM_OPTEE) || defined(CONFIG_PBL_OPTEE)
> +#define arm_mem_stack_top(membase, endmem) (__arm_mem_stack_top(membase, endmem) - OPTEE_SIZE)
> +#else
> +#define arm_mem_stack_top(membase, endmem) (__arm_mem_stack_top(membase, endmem) - OPTEE_SIZE)
Argh. Should have looked more closely before sending out. I'll respin later,
but looking forward to feedback in the mean time.
> +#endif
>
> static inline unsigned long arm_mem_stack(unsigned long membase,
> unsigned long endmem)
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
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:[~2021-12-02 8:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-02 7:42 [PATCH 1/3] ARM: implement ENTRY_FUNCTION_WITHSTACK Ahmad Fatoum
2021-12-02 7:42 ` [PATCH 2/3] ARM: turn arm_mem_stack_top into a macro Ahmad Fatoum
2021-12-02 8:01 ` Ahmad Fatoum [this message]
2021-12-07 9:26 ` Sascha Hauer
2021-12-02 7:42 ` [PATCH 3/3] ARM: rpi: use ENTRY_FUNCTION_WITHSTACK to prepare for ARM64 support Ahmad Fatoum
2021-12-02 7:56 ` [PATCH] fixup! ARM: implement ENTRY_FUNCTION_WITHSTACK Ahmad Fatoum
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=f1721621-fc62-7ec8-f1cb-b6659853ab22@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=ukl@pengutronix.de \
/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