]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
Arm64: make setup_virt_paging()'s pa_range_info[] static
authorJan Beulich <jbeulich@suse.com>
Tue, 29 Nov 2022 14:39:05 +0000 (15:39 +0100)
committerJulien Grall <julien@xen.org>
Sat, 3 Dec 2022 18:09:50 +0000 (18:09 +0000)
While not as inefficient as it would be on x86 (due to suitable constant
loading and register pair storing instructions being available to fill
some of the fields), having the compiler construct an array of constants
on the stack still looks odd to me.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/p2m.c

index 9bc5443d9e8a67bec292ac47ecc090931eb5fb2e..fee830192a88e8cf9f92e98ad0d41bb64251f79a 100644 (file)
@@ -2281,12 +2281,12 @@ void __init setup_virt_paging(void)
     val |= VTCR_T0SZ(0x18); /* 40 bit IPA */
     val |= VTCR_SL0(0x1); /* P2M starts at first level */
 #else /* CONFIG_ARM_64 */
-    const struct {
+    static const struct {
         unsigned int pabits; /* Physical Address Size */
         unsigned int t0sz;   /* Desired T0SZ, minimum in comment */
         unsigned int root_order; /* Page order of the root of the p2m */
         unsigned int sl0;    /* Desired SL0, maximum in comment */
-    } pa_range_info[] = {
+    } pa_range_info[] __initconst = {
         /* T0SZ minimum and SL0 maximum from ARM DDI 0487H.a Table D5-6 */
         /*      PA size, t0sz(min), root-order, sl0(max) */
         [0] = { 32,      32/*32*/,  0,          1 },