[PATCH master v2 1/7] firmware: reference pointer alignment defined in <asm-generic/pointer.h>

Sascha Hauer sha at pengutronix.de
Wed Jun 28 00:14:30 PDT 2023


On Tue, Jun 27, 2023 at 07:52:33AM +0200, Ahmad Fatoum wrote:
> We already define pointer size constants for use in assembly. Make use
> of this header. No functional change.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
>  firmware/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/firmware/Makefile b/firmware/Makefile
> index 75812cb6bf24..80c498994cce 100644
> --- a/firmware/Makefile
> +++ b/firmware/Makefile
> @@ -41,12 +41,12 @@ obj-pbl-y := $(addsuffix .gen.o, $(firmware-y))
>  
>  FWNAME    = $(patsubst $(obj)/%.extgen.S,%,$(patsubst $(obj)/%.gen.S,%,$@))
>  FWSTR     = $(subst /,_,$(subst .,_,$(subst -,_,$(FWNAME))))
> -ASM_ALIGN = $(if $(CONFIG_64BIT),3,2)
>  
>  filechk_fwbin = { \
>  	echo "/* Generated by $(src)/Makefile */"		;\
> +	echo "\#include <asm-generic/pointer.h>"		;\
>  	echo "    .section $2,\"$3\""				;\
> -	echo "    .p2align $(ASM_ALIGN)"			;\
> +	echo "    .p2align $(ASM_LGPTR)"			;\

This expands ASM_LGPTR as a Make variable. That variable is empty, so
this results in .p2align without argument. Should be .p2align ASM_LGPTR.

>  	echo ".global _fw_$(FWSTR)_start"			;\
>  	echo "_fw_$(FWSTR)_start:"				;\
>  	echo "    .incbin \"$(fwdir)/$(FWNAME)\""		;\
> @@ -56,7 +56,7 @@ filechk_fwbin = { \
>  
>  __fwbin_sha = { \
>  	echo "    .section .rodata.$(FWSTR).sha"		;\
> -	echo "    .p2align $(ASM_ALIGN)"			;\
> +	echo "    .p2align $(ASM_LGPTR)"			;\

Ditto. I'll fix that up while applying.

Sascha

-- 
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 |



More information about the barebox mailing list