FROMLIST: arm64: make mrs_s and msr_s macros work with LTO
authorAlex Matveev <alxmtvv@gmail.com>
Tue, 14 Nov 2017 23:06:17 +0000 (15:06 -0800)
committerSami Tolvanen <samitolvanen@google.com>
Thu, 26 Apr 2018 23:03:36 +0000 (16:03 -0700)
commit6b066ebd4e9f593784d385d6ea915ab1ec9ffaf3
tree4a23484be6693f323d44233d9ee35203a52cec00
parent1642d70c0d44daf75d5b0238d97e3f6419b8e892
FROMLIST: arm64: make mrs_s and msr_s macros work with LTO

Clang's integrated assembler does not allow assembly macros defined
in one inline asm block using the .macro directive to be used across
separate asm blocks. LLVM developers consider this a feature and not a
bug, recommending code refactoring:

  https://bugs.llvm.org/show_bug.cgi?id=19749

As binutils doesn't allow macros to be redefined, this change uses
UNDEFINE_MRS_S and UNDEFINE_MSR_S to define corresponding macros
in-place and workaround gcc and clang limitations on redefining macros
across different assembler blocks.

Bug: 62093296
Bug: 67506682
Change-Id: I803fff57f639b0921ef81f90ec4befe802e7eecf
(am from https://patchwork.kernel.org/patch/10060343/)
Signed-off-by: Alex Matveev <alxmtvv@gmail.com>
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/include/asm/sysreg.h