xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory
authorPenny Zheng <penny.zheng@arm.com>
Mon, 14 Feb 2022 03:19:51 +0000 (03:19 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 17 Feb 2022 19:43:02 +0000 (19:43 +0000)
Helper allocate_static_memory is not meant to be reachable when built with
!CONFIG_STATIC_MEMORY, so this commit adds ASSERT_UNREACHABLE in it to catch
potential misuse.

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain_build.c

index ec29bd302ca0157d466bbf829f160a93d3f74a2b..52f256de9c24605d029f3b8564c68bb5c69258d9 100644 (file)
@@ -755,6 +755,7 @@ static void __init allocate_static_memory(struct domain *d,
                                           struct kernel_info *kinfo,
                                           const struct dt_device_node *node)
 {
+    ASSERT_UNREACHABLE();
 }
 
 static void __init assign_static_memory_11(struct domain *d,