[PATCH 4/5] arm64: kernel: Add optional CONFIG_ parameter to ALTERNATIVE().

Catalin Marinas catalin.marinas at arm.com
Fri Jul 17 04:08:01 PDT 2015


On Thu, Jul 16, 2015 at 05:01:58PM +0100, James Morse wrote:
> Some uses of ALTERNATIVE() may depend on a feature that is disabled at
> compile time by a Kconfig option. In this case the unused alternative
> instructions waste space, and if the original instruction is a nop, it
> wastes time and space.
> 
> This patch adds an optional 'config' option to ALTERNATIVE() and
> alternative_insn that allows the compiler to remove both the original
> and alternative instructions if the config option is not defined.
> 
> Signed-off-by: James Morse <james.morse at arm.com>
> Suggested-by: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will.deacon at arm.com>

Acked-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list