domain_use_host_layout() is generic enough to be moved to the common header xen/domain.h.
Wrap domain_use_host_layout() with "#ifndef domain_use_host_layout" to allow architectures to override it if needed. No functional change. Signed-off-by: Oleksii Kurochko <[email protected]> --- xen/arch/arm/include/asm/domain.h | 14 -------------- xen/include/xen/domain.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/domain.h index 758ad807e461..1a04fe658c97 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -29,20 +29,6 @@ enum domain_type { #define is_64bit_domain(d) (0) #endif -/* - * Is the domain using the host memory layout? - * - * Direct-mapped domain will always have the RAM mapped with GFN == MFN. - * To avoid any trouble finding space, it is easier to force using the - * host memory layout. - * - * The hardware domain will use the host layout regardless of - * direct-mapped because some OS may rely on a specific address ranges - * for the devices. - */ -#define domain_use_host_layout(d) (is_domain_direct_mapped(d) || \ - is_hardware_domain(d)) - struct vtimer { struct vcpu *v; int irq; diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h index 93c0fd00c1d7..40487825ad91 100644 --- a/xen/include/xen/domain.h +++ b/xen/include/xen/domain.h @@ -62,6 +62,22 @@ void domid_free(domid_t domid); #define is_domain_direct_mapped(d) ((d)->cdf & CDF_directmap) #define is_domain_using_staticmem(d) ((d)->cdf & CDF_staticmem) +/* + * Is the domain using the host memory layout? + * + * Direct-mapped domain will always have the RAM mapped with GFN == MFN. + * To avoid any trouble finding space, it is easier to force using the + * host memory layout. + * + * The hardware domain will use the host layout regardless of + * direct-mapped because some OS may rely on a specific address ranges + * for the devices. + */ +#ifndef domain_use_host_layout +# define domain_use_host_layout(d) (is_domain_direct_mapped(d) || \ + is_hardware_domain(d)) +#endif + /* * Arch-specifics. */ -- 2.52.0
