arm64: Fix labels in el2_setup macros
authorMarc Zyngier <maz@kernel.org>
Mon, 8 Feb 2021 09:57:10 +0000 (09:57 +0000)
committerWill Deacon <will@kernel.org>
Mon, 8 Feb 2021 12:51:26 +0000 (12:51 +0000)
commit114945d84a30a5feba8ec24d854257c78c89abd1
tree6c5cfecce9b5b573e87b9a6208747ba6511c1645
parent19c329f6808995b142b3966301f217c831e7cf31
arm64: Fix labels in el2_setup macros

If someone happens to write the following code:

b 1f
init_el2_state vhe
1:
[...]

they will be in for a long debugging session, as the label "1f"
will be resolved *inside* the init_el2_state macro instead of
after it. Not really what one expects.

Instead, rewite the EL2 setup macros to use unambiguous labels,
thanks to the usual macro counter trick.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-2-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/el2_setup.h