]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/arm: Initialize AS 0 first
authorGustavo Romero <gustavo.romero@linaro.org>
Fri, 16 Jan 2026 18:58:11 +0000 (15:58 -0300)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 22 Jan 2026 09:48:46 +0000 (10:48 +0100)
Move the initialization of AS of index 0 (ARMASIdx_NS) so it happens
before the initialization of the other address spaces. This is purely a
code organization change with no effect on behavior.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260116185814.108560-2-gustavo.romero@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
target/arm/cpu.c

index 05fa3339b1a5a369bb61e76309dce0f1514af29e..8d5987397ad5f0369956b59e9ca1051f26d03b0b 100644 (file)
@@ -2159,6 +2159,8 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
         cs->num_ases = 1 + has_secure;
     }
 
+    cpu_address_space_init(cs, ARMASIdx_NS, "cpu-memory", cs->memory);
+
     if (has_secure) {
         if (!cpu->secure_memory) {
             cpu->secure_memory = cs->memory;
@@ -2176,8 +2178,6 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
         }
     }
 
-    cpu_address_space_init(cs, ARMASIdx_NS, "cpu-memory", cs->memory);
-
     /* No core_count specified, default to smp_cpus. */
     if (cpu->core_count == -1) {
         cpu->core_count = smp_cpus;