Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 364ffc06 authored by James Morse's avatar James Morse Committed by Sami Tolvanen
Browse files

UPSTREAM: arm64: kernel: Add optional CONFIG_ parameter to ALTERNATIVE()



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.

Suggested-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>

Bug: 31432001
Change-Id: I57ea54cac8b50b45fd562beb1e4b6cdc4201435b
(cherry picked from commit 91a5cefa2f98bdd3404c2fba57048c4fa225cc37)
Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
parent e0671545
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment