]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: fix ifdefs in ARMv8 lowlevel_init()
authorStephen Warren <swarren@nvidia.com>
Thu, 28 Apr 2016 18:45:44 +0000 (12:45 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 6 May 2016 14:10:05 +0000 (10:10 -0400)
Commit 724219a65f55 "ARM: always perform per-CPU GIC init" removed some
ifdefs to unify the MULTIENTRY-vs-non-MULTIENTRY paths. However, the
wrong endif was removed. This patch adds back that missing endif, and
adds a new ifdef to match the endif the now-correctly-terminated block
used to match against. Use "git show -U25 724219a65f55" to see enough
context to make the original issue clear.

In practical terms, this makes no difference to runtime behaviour. The
code that was incorrectly compiled into the binary when ifndef MULTIENTRY
is a no-op for other cases, since branch_if_master evaluates to a hard-
coded jump. The only issues were:

- A few extra instructions were added to the binary.
- The comment on the endif at the very end of the function, indicating
which ifdef it matched, were wrong.

An alternative might be to simply fix the comment on that trailing ifdef,
but that only addresses the second point above, not the first.

Fixes: 724219a65f55 ("ARM: always perform per-CPU GIC init")
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/cpu/armv8/start.S

index deb44a895fdab9aeaabfccfa9f9be7f6a57f0549..c3cc8199caf94f87f869c30d720ed09a6d6b7fb1 100644 (file)
@@ -214,7 +214,9 @@ WEAK(lowlevel_init)
        ldr     x1, =GICC_BASE
        bl      gic_init_secure_percpu
 #endif
+#endif
 
+#ifndef CONFIG_ARMV8_MULTIENTRY
        branch_if_master x0, x1, 2f
 
        /*