kernel-fxtec-pro1x/arch/arm64
Sami Tolvanen 7cdb44ab26 arm64: fix alternatives with LLVM's integrated assembler
[ Upstream commit c54f90c2627cc316d365e3073614731e17dbc631 ]

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-24 08:34:48 +01:00
..
boot arm64: dts: qcom: msm8996: Disable USB2 PHY suspend by core 2020-02-24 08:34:41 +01:00
configs arm64: defconfig: Re-enable bcm2835-thermal driver 2020-01-27 14:50:10 +01:00
crypto crypto: arm64/sha2-ce - correct digest for empty data in finup 2019-07-26 09:14:19 +02:00
include arm64: fix alternatives with LLVM's integrated assembler 2020-02-24 08:34:48 +01:00
kernel arm64: ssbs: Fix context-switch when SSBS is present on all CPUs 2020-02-19 19:51:56 +01:00
kvm arm64: nofpsmid: Handle TIF_FOREIGN_FPSTATE flag cleanly 2020-02-19 19:51:54 +01:00
lib arm64: lib: use C string functions with KASAN enabled 2019-12-01 09:17:01 +01:00
mm arm64: Revert support for execute-only user mappings 2020-01-09 10:19:03 +01:00
net bpf, arm64: use more scalable stadd over ldxr / stxr loop in xadd 2019-07-03 13:14:49 +02:00
xen arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
Kconfig arm64: enable generic CPU vulnerabilites support 2019-10-11 18:21:33 +02:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Kconfig.platforms ARM: SoC: late updates 2018-08-25 14:12:36 -07:00
Makefile arm64: makefile fix build of .i file in external module case 2019-12-01 09:17:14 +01:00