Function arch_do_domctl() is responsible for arch-specific domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS Guard arm-specific domctl.o compilation with CONFIG_MGMT_HYPERCALLS. Otherwise the whole file will become unreachable when MGMT_HYPERCALLS=n, and hence violating Misra Rule 2.1.
Signed-off-by: Penny Zheng <[email protected]> --- v3 -> v4: - split arch-specific domctl-op into x86 and arm --- xen/arch/arm/Makefile | 2 +- xen/arch/arm/arm32/Makefile | 2 +- xen/arch/arm/arm64/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 2aff1a1630..2f4593f5eb 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -20,7 +20,7 @@ obj-$(CONFIG_IOREQ_SERVER) += dm.o obj-$(CONFIG_DOM0LESS_BOOT) += dom0less-build.init.o obj-y += domain.o obj-y += domain_build.init.o -obj-y += domctl.o +obj-$(CONFIG_MGMT_HYPERCALLS) += domctl.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-y += efi/ obj-y += gic.o diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile index 531168f58a..f8cbf14211 100644 --- a/xen/arch/arm/arm32/Makefile +++ b/xen/arch/arm/arm32/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_MPU) += mpu/ obj-y += cache.o obj-$(CONFIG_EARLY_PRINTK) += debug.o -obj-y += domctl.o +obj-$(CONFIG_MGMT_HYPERCALLS) += domctl.o obj-y += domain.o obj-y += entry.o obj-y += head.o diff --git a/xen/arch/arm/arm64/Makefile b/xen/arch/arm/arm64/Makefile index 6491c5350b..6b77a15abe 100644 --- a/xen/arch/arm/arm64/Makefile +++ b/xen/arch/arm/arm64/Makefile @@ -6,7 +6,7 @@ obj-y += cache.o obj-y += cpufeature.o obj-$(CONFIG_HARDEN_BRANCH_PREDICTOR) += bpi.o obj-$(CONFIG_EARLY_PRINTK) += debug.o -obj-y += domctl.o +obj-$(CONFIG_MGMT_HYPERCALLS) += domctl.o obj-y += domain.o obj-y += entry.o obj-y += head.o -- 2.34.1
