]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm64: zynqmp: Fix lockstep mode cpu release functionality
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Thu, 8 Jun 2023 03:21:52 +0000 (08:51 +0530)
committerMichal Simek <michal.simek@amd.com>
Mon, 12 Jun 2023 11:25:02 +0000 (13:25 +0200)
For lockstep mode, cpu_release function is expecting to execute
on R5 core 0, if there is attempt to pass other than R5 core 0,
through an error saying "Lockstep mode should run on R5 core 0 only".

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20230608032152.980-3-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
arch/arm/mach-zynqmp/mp.c

index 7a12f4b2b6c7466efe030017fd5c99dcb6687103..b06c867e57f662852353cbdc56387737819ff7e6 100644 (file)
@@ -326,6 +326,10 @@ int cpu_release(u32 nr, int argc, char *const argv[])
                flush_dcache_all();
 
                if (!strncmp(argv[1], "lockstep", 8)) {
+                       if (nr != ZYNQMP_CORE_RPU0) {
+                               printf("Lockstep mode should run on ZYNQMP_CORE_RPU0\n");
+                               return 1;
+                       }
                        printf("R5 lockstep mode\n");
                        set_r5_reset(nr, LOCK);
                        set_r5_tcm_mode(LOCK);