From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: asm: simplify arm_mem_stack_top
Date: Wed, 4 Jan 2023 10:11:58 +0100 [thread overview]
Message-ID: <20230104091158.GM11668@pengutronix.de> (raw)
In-Reply-To: <20230104072848.3693607-1-a.fatoum@pengutronix.de>
On Wed, Jan 04, 2023 at 08:28:48AM +0100, Ahmad Fatoum wrote:
> <asm-generic/memory_layout.h> always defines OPTEE_SIZE and sets it
> to zero when CONFIG_OPTEE_SIZE is undefined. As CONFIG_OPTEE_SIZE
> definition is dependent on BOOTM_OPTEE || PBL_OPTEE, we can replace
> the #ifdeffery and directly use OPTEE_SIZE in the macro.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/include/asm/barebox-arm.h | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
> index 2dcd4153200f..515525e49d31 100644
> --- a/arch/arm/include/asm/barebox-arm.h
> +++ b/arch/arm/include/asm/barebox-arm.h
> @@ -80,13 +80,7 @@ static inline const void *arm_mem_scratch_get(void)
> return (const void *)__arm_mem_scratch(arm_mem_endmem_get());
> }
>
> -#define __arm_mem_stack_top(membase, endmem) ((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)
> -#endif
> +#define arm_mem_stack_top(membase, endmem) ((endmem) - SZ_64K - OPTEE_SIZE)
>
> static inline unsigned long arm_mem_stack(unsigned long membase,
> unsigned long endmem)
> --
> 2.30.2
>
>
>
--
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 |
prev parent reply other threads:[~2023-01-04 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 7:28 Ahmad Fatoum
2023-01-04 9:11 ` Sascha Hauer [this message]
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=20230104091158.GM11668@pengutronix.de \
--to=sha@pengutronix.de \
--cc=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