Commit 73e58e88 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Kleber Sacilotto de Souza

arm64: Disable asm-operand-width warning for clang

BugLink: https://bugs.launchpad.net/bugs/1810958

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: default avatarMatthias Kaehlcke <mka@chromium.org>

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 d41d0fe3
    ("turn off -Wattribute-alias") in this tree.
Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 2f42f0e3
......@@ -57,6 +57,10 @@ else
TEXT_OFFSET := 0x00080000
endif
ifeq ($(cc-name),clang)
KBUILD_CFLAGS += $(call cc-disable-warning, asm-operand-widths)
endif
# KASAN_SHADOW_OFFSET = VA_START + (1 << (VA_BITS - 3)) - (1 << 61)
# in 32-bit arithmetic
KASAN_SHADOW_OFFSET := $(shell printf "0x%08x00000000\n" $$(( \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment