diff options
author | Will Deacon <will@kernel.org> | 2019-08-30 12:55:39 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-08-30 12:55:39 +0100 |
commit | 61b7cddfe861f239bf39ab19a065e29b58153a80 (patch) | |
tree | e4930ac4950b72203cfebfc3b6565b346747b33f /arch/arm64/Makefile | |
parent | ac12cf85d682a2c1948210c65f7fb21ef01dd9f6 (diff) | |
parent | 03adcbd996be7ce81cac793b1511406a7a4df117 (diff) | |
download | lwn-61b7cddfe861f239bf39ab19a065e29b58153a80.tar.gz lwn-61b7cddfe861f239bf39ab19a065e29b58153a80.zip |
Merge branch 'for-next/atomics' into for-next/core
* for-next/atomics: (10 commits)
Rework LSE instruction selection to use static keys instead of alternatives
Diffstat (limited to 'arch/arm64/Makefile')
-rw-r--r-- | arch/arm64/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 2847b36f72ed..f843d298792d 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -39,6 +39,12 @@ $(warning LSE atomics not supported by binutils) endif endif +cc_has_k_constraint := $(call try-run,echo \ + 'int main(void) { \ + asm volatile("and w0, w0, %w0" :: "K" (4294967295)); \ + return 0; \ + }' | $(CC) -S -x c -o "$$TMP" -,,-DCONFIG_CC_HAS_K_CONSTRAINT=1) + ifeq ($(CONFIG_ARM64), y) brokengasinst := $(call as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n,,-DCONFIG_BROKEN_GAS_INST=1) @@ -63,7 +69,8 @@ ifeq ($(CONFIG_GENERIC_COMPAT_VDSO), y) endif endif -KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) $(brokengasinst) $(compat_vdso) +KBUILD_CFLAGS += -mgeneral-regs-only $(lseinstr) $(brokengasinst) \ + $(compat_vdso) $(cc_has_k_constraint) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-disable-warning, psabi) KBUILD_AFLAGS += $(lseinstr) $(brokengasinst) $(compat_vdso) |