]>
Commit | Line | Data |
---|---|---|
22b74881 GKH |
1 | From foo@baz Wed Nov 21 18:50:39 CET 2018 |
2 | From: Matthias Kaehlcke <mka@chromium.org> | |
3 | Date: Fri, 21 Apr 2017 16:00:56 -0700 | |
4 | Subject: arm64: Disable asm-operand-width warning for clang | |
5 | ||
6 | From: Matthias Kaehlcke <mka@chromium.org> | |
7 | ||
8 | clang raises 'asm-operand-widths' warnings in inline assembly code when | |
9 | the size of an operand is < 64 bits and the operand width is unspecified. | |
10 | Most warnings are raised in macros, i.e. the datatype of the operand may | |
11 | vary. | |
12 | ||
13 | Signed-off-by: Matthias Kaehlcke <mka@chromium.org> | |
14 | ||
15 | nc: I trimmed the original commit message since I'm not a part of CrOS | |
16 | and can't speak on their behalf. | |
17 | ||
18 | To fix these warnings, it requires a fairly intrusive backport of | |
19 | the sysreg conversion that Mark Rutland did in 4.9. I think | |
20 | disabling the warning is smarter, similar to commit d41d0fe374d4 | |
21 | ("turn off -Wattribute-alias") in this tree. | |
22 | ||
23 | Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> | |
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
25 | --- | |
26 | arch/arm64/Makefile | 4 ++++ | |
27 | 1 file changed, 4 insertions(+) | |
28 | ||
29 | --- a/arch/arm64/Makefile | |
30 | +++ b/arch/arm64/Makefile | |
31 | @@ -56,6 +56,10 @@ else | |
32 | TEXT_OFFSET := 0x00080000 | |
33 | endif | |
34 | ||
35 | +ifeq ($(cc-name),clang) | |
36 | +KBUILD_CFLAGS += $(call cc-disable-warning, asm-operand-widths) | |
37 | +endif | |
38 | + | |
39 | # KASAN_SHADOW_OFFSET = VA_START + (1 << (VA_BITS - 3)) - (1 << 61) | |
40 | # in 32-bit arithmetic | |
41 | KASAN_SHADOW_OFFSET := $(shell printf "0x%08x00000000\n" $$(( \ |