From: Grygorii Strashko <[email protected]> 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 861672 322412 274976 1459060 164374 xen-syms-before After (CONFIG_ARM64_AARCH32=n): text data bss dec hex filename 857856 322412 274976 1455244 16348c xen-syms-after Signed-off-by: Grygorii Strashko <[email protected]> Reviewed-by: Volodymyr Babchuk <[email protected]> --- v3: - no changes, add tag 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 99c6c97a8057..139d3ce0dd53 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 -- 2.34.1
