arm64: alternative: Provide if/else/endif assembler macros
authorDaniel Thompson <daniel.thompson@linaro.org>
Wed, 22 Jul 2015 11:21:01 +0000 (12:21 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:40 +0000 (11:08 +0100)
commit63e40815f02584ba8174e0f6af40924b2b335cae
treeda38a80614dd8913464ae5bb86b712400f3624fd
parent79b0e09a3c9bd74ee54582efdb351179d7c00351
arm64: alternative: Provide if/else/endif assembler macros

The existing alternative_insn macro has some limitations that make it
hard to work with. In particular the fact it takes instructions from it
own macro arguments means it doesn't play very nicely with C pre-processor
macros because the macro arguments look like a string to the C
pre-processor. Workarounds are (probably) possible but things start to
look ugly.

Introduce an alternative set of macros that allows instructions to be
presented to the assembler as normal and switch everything over to the
new macros.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/alternative.h