[PATCH v2 1/2] log: select physical address formatting in a generic way
Abdellatif El Khlifi
abdellatif.elkhlifi at arm.com
Fri Oct 20 14:12:43 CEST 2023
Hi Simon,
> sets the log formatting according to the platform (64-bit vs 32-bit)
>
> Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
> cmd/armffa.c | 8 --------
> include/log.h | 9 +++++++++
> 2 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/cmd/armffa.c b/cmd/armffa.c
> index 7e6eafc03a..ab0fd54d97 100644
> --- a/cmd/armffa.c
> +++ b/cmd/armffa.c
> @@ -13,14 +13,6 @@
> #include <stdlib.h>
> #include <asm/io.h>
>
> -/* Select the right physical address formatting according to the platform */
> -#ifdef CONFIG_PHYS_64BIT
> -#define PhysAddrLength "ll"
> -#else
> -#define PhysAddrLength ""
> -#endif
> -#define PHYS_ADDR_LN "%" PhysAddrLength "x"
> -
> /**
> * ffa_get_dev() - Return the FF-A device
> * @devp: pointer to the FF-A device
> diff --git a/include/log.h b/include/log.h
> index 6e84f080ef..3f631d6816 100644
> --- a/include/log.h
> +++ b/include/log.h
> @@ -370,6 +370,15 @@ void __assert_fail(const char *assertion, const char *file, unsigned int line,
> #define log_msg_retz(_msg, _ret) ((void)(_msg), _ret)
> #endif
>
> +/* Select the right physical address formatting according to the platform */
> +#ifdef CONFIG_PHYS_64BIT
> +#define PhysAddrLength "ll"
> +#else
> +#define PhysAddrLength ""
> +#endif
> +#define PHYS_ADDR_LN "%" PhysAddrLength "x"
> +#define PHYS_ADDR_LNU "%" PhysAddrLength "u"
> +
> /** * enum log_rec_flags - Flags for a log record */
> enum log_rec_flags {
> /** @LOGRECF_FORCE_DEBUG: Force output of debug record */
> --
> 2.25.1
>
Any feedback about this specific commit please ?
A gentle reminder about the context: While I was working on the FF-A support,
you suggested that I move PHYS_ADDR_LN macros to a common location so it can be used
in a generic way.
Cheers,
Abdellatif
More information about the U-Boot
mailing list