linux-stable/arch/arm64
Sami Tolvanen 556b80a2b5 arm64: fix alternatives with LLVM's integrated assembler
[ Upstream commit c54f90c262 ]

LLVM's integrated assembler fails with the following error when
building KVM:

  <inline asm>:12:6: error: expected absolute expression
   .if kvm_update_va_mask == 0
       ^
  <inline asm>:21:6: error: expected absolute expression
   .if kvm_update_va_mask == 0
       ^
  <inline asm>:24:2: error: unrecognized instruction mnemonic
          NOT_AN_INSTRUCTION
          ^
  LLVM ERROR: Error parsing inline asm

These errors come from ALTERNATIVE_CB and __ALTERNATIVE_CFG,
which test for the existence of the callback parameter in inline
assembly using the following expression:

  " .if " __stringify(cb) " == 0\n"

This works with GNU as, but isn't supported by LLVM. This change
splits __ALTERNATIVE_CFG and ALTINSTR_ENTRY into separate macros
to fix the LLVM build.

Link: https://github.com/ClangBuiltLinux/linux/issues/472
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-28 16:36:05 +01:00
..
boot arm64: dts: qcom: msm8996: Disable USB2 PHY suspend by core 2020-02-28 16:36:00 +01:00
configs arm64: defconfig: Enable Rockchip io-domain driver 2018-08-03 07:50:38 +02:00
crypto crypto: arm64/sha2-ce - correct digest for empty data in finup 2019-07-31 07:28:35 +02:00
include arm64: fix alternatives with LLVM's integrated assembler 2020-02-28 16:36:05 +01:00
kernel arm64: ssbs: Fix context-switch when SSBS is present on all CPUs 2020-02-28 16:35:53 +01:00
kvm KVM: arm64: Ensure 'params' is initialised when looking up sys register 2019-12-31 12:38:02 +01:00
lib arm64: lib: use C string functions with KASAN enabled 2019-12-01 09:13:48 +01:00
mm arm64: Make sure permission updates happen for pmd/pud 2020-01-17 19:45:42 +01:00
net bpf: get rid of pure_initcall dependency to enable jits 2019-08-25 10:50:02 +02:00
xen
Kconfig arm64: enable generic CPU vulnerabilites support 2019-10-29 09:17:26 +01:00
Kconfig.debug
Kconfig.platforms arm64: rockchip: Force CONFIG_PM on Rockchip systems 2018-09-15 09:45:33 +02:00
Makefile arm64: makefile fix build of .i file in external module case 2019-12-01 09:13:59 +01:00