Hi,

Grygorii Strashko <grygorii_stras...@epam.com> writes:

> From: Grygorii Strashko <grygorii_stras...@epam.com>
>
> Constify is_32/64bit_domain() macro for the case CONFIG_ARM64_AARCH32=n and
> so allow compiler to opt out Aarch32 specific code.
>
> Before (CONFIG_ARM64_AARCH32=y):
>    text          data     bss     dec     hex filename
>  859212        322404  270880 1452496  1629d0 xen-syms-before
>
> After (CONFIG_ARM64_AARCH32=n):
>    text          data     bss     dec     hex filename
>  851256        322404  270880 1444540  160abc xen-syms-after
>
> Signed-off-by: Grygorii Strashko <grygorii_stras...@epam.com>

Reviewed-by: Volodymyr Babchuk <volodymyr_babc...@epam.com>

> ---
> v2:
> - use IS_ENABLED(CONFIG_ARM64_AARCH32) instead of ifdefs
>
>  xen/arch/arm/include/asm/arm64/domain.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/include/asm/arm64/domain.h 
> b/xen/arch/arm/include/asm/arm64/domain.h
> index bebcbc582f97..70dfbeac7443 100644
> --- a/xen/arch/arm/include/asm/arm64/domain.h
> +++ b/xen/arch/arm/include/asm/arm64/domain.h
> @@ -12,14 +12,16 @@ struct kernel_info;
>   *
>   * @d: pointer to the domain structure
>   */
> -#define is_32bit_domain(d) ((d)->arch.type == DOMAIN_32BIT)
> +#define is_32bit_domain(d)                                                   
>   \
> +        (IS_ENABLED(CONFIG_ARM64_AARCH32) && (d)->arch.type == DOMAIN_32BIT)
>  
>  /*
>   * Returns true if guest execution state is AArch64
>   *
>   * @d: pointer to the domain structure
>   */
> -#define is_64bit_domain(d) ((d)->arch.type == DOMAIN_64BIT)
> +#define is_64bit_domain(d)                                                   
>   \
> +        (!IS_ENABLED(CONFIG_ARM64_AARCH32) || (d)->arch.type == DOMAIN_64BIT)
>  
>  /*
>   * Arm64 declares AArch32 (32bit) Execution State support in the

-- 
WBR, Volodymyr

Reply via email to