Skip to content

Commit f5d99c3

Browse files
Matthias Kaehlckemosimchah
Matthias Kaehlcke
authored andcommitted
STABLE: arm64: Disable asm-operand-width warning for clang
clang raises 'asm-operand-widths' warnings in inline assembly code when the size of an operand is < 64 bits and the operand width is unspecified. Most warnings are raised in macros, i.e. the datatype of the operand may vary. Signed-off-by: Matthias Kaehlcke <[email protected]> nc: I trimmed the original commit message since I'm not a part of CrOS and can't speak on their behalf. To fix these warnings, it requires a fairly intrusive backport of the sysreg conversion that Mark Rutland did in 4.9. I think disabling the warning is smarter, similar to commit d41d0fe374d4 ("turn off -Wattribute-alias") in this tree. Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Link: https://git.kernel.org/stable/c/2b92e27f26f136b9c16a0ccb94a89ff599814675 Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 1a190dc commit f5d99c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm64/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ else
4747
TEXT_OFFSET := 0x00080000
4848
endif
4949

50+
ifeq ($(cc-name),clang)
51+
KBUILD_CFLAGS += $(call cc-disable-warning, asm-operand-widths)
52+
endif
53+
5054
# KASAN_SHADOW_OFFSET = VA_START + (1 << (VA_BITS - 3)) - (1 << 61)
5155
# in 32-bit arithmetic
5256
KASAN_SHADOW_OFFSET := $(shell printf "0x%08x00000000\n" $$(( \

0 commit comments

Comments
 (0)