Early prototypes of Clang with asm goto support produce 6 instances of
the following warning:
In file included from arch/x86/boot/compressed/misc.h:20:
In file included from ./include/linux/elf.h:5:
In file included from ./arch/x86/include/asm/elf.h:8:
In file included from ./include/linux/thread_
These are implied by the target architecture and for x86_64 match the
max-page-size. The default for non-NaCl x86_64 is 0x1000 (4096).
In bfd the common page size is defined as 0x1000 (4096) for non-NaCl
x86_64 targets:
bfd/elf64-x86-64.c:
4998:#define ELF_COMMONPAGESIZE 0x1000
For g
From: Rafael Ávila de Espíndola
The kernel has many variables that it wants to have per CPU. It is
similar to how each thread wants a copy of a thread local variable.
To access such variable, the code has to find the offset of that
variable in the per cpu block and add it to the address of the c
GNU linker's -z common-page-size's default value is based on the target
architecture. arch/x86/entry/vdso/Makefile sets it to the architecture
default, which is implicit and redundant. Drop it.
Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulni...@google.com
Signed-off-by: Nick Desa
GNU linker's -z common-page-size's default value is based on the target
architecture. arch/arm/vdso/Makefile sets it to the architecture
default, which is implicit and redundant. Drop it.
Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulni...@google.com
Signed-off-by: Nick Desaulnier
GNU linker's -z common-page-size's default value is based on the target
architecture. arch/sparc/vdso/Makefile sets it to the architecture
default, which is implicit and redundant. Drop it.
Link: https://lkml.kernel.org/r/20181206191231.192355-1-ndesaulni...@google.com
Signed-off-by: Nick Desaulni
asm_volatile_goto should also be defined for other compilers that support
asm goto.
Signed-off-by: Nick Desaulniers
---
V1 -> V2: drop changes to include/linux/compiler-gcc.h.
include/linux/compiler_types.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux/compiler_types.h b
asm_volatile_goto should also be defined for other compilers that support
asm goto.
Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h
mutually exclusive").
Signed-off-by: Nick Desaulniers
---
V2 -> V3: update subject line & add reference to fixed commit.
V1 -> V2: drop cha
Fixes the objtool warning seen with Clang:
arch/x86/mm/fault.o: warning: objtool: no_context()+0x220: unreachable
instruction
Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h
mutually exclusive")
Josh noted that the fallback definition was meant to work around a
pre-gcc-4.
Remove the comment about being unable to detect __builtin_unreachable.
__builtin_unreachable was implemented in the GCC 4.5 timeframe. The
kernel's minimum supported version of GCC is 4.6 since commit
cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). Commit
cb984d101b30 ("compiler-gcc
by swapping h2 and h3.
security/keys/trusted.c:146:17: warning: passing an object that
undergoes default
argument promotion to 'va_start' has undefined behavior [-Wvarargs]
va_start(argp, h3);
^
security/keys/trusted.c:126:37: note: parameter of type 'unsigned
Fixes the warning reported by Clang:
security/keys/trusted.c:146:17: warning: passing an object that
undergoes default
argument promotion to 'va_start' has undefined behavior [-Wvarargs]
va_start(argp, h3);
^
security/keys/trusted.c:126:37: note: parameter of ty
Clang warns: vector initializers are not compatible with NEON intrinsics
in big endian mode [-Wnonportable-vector-initialization]
While this is usually the case, it's not an issue for this case since
we're initializing the uint8x16_t (16x uint8_t's) with the same value.
Instead, use vdupq_n_u8 wh
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.
Link: https://github.com/ClangBuiltLinux/linux/issues/342
Su
Similar to how we differentiate between CONFIG_CC_IS_GCC and
CONFIG_CC_IS_CLANG, add CONFIG_LD_IS_BFD, CONFIG_LD_IS_GOLD, and
CONFIG_LD_IS_LLD.
This simiplifies patches to Makefiles that need to do different things
for different linkers.
Cc: Sami Tolvanen
Suggested-by: Sedat Dilek
Reviewed-by:
This patch cleans up a few places in the Makefile to make way for
landing LLD support in the kernel. There are still a few arch specific
fixes that need to get upstreamed, but this core set of patches should
be arch independent.
Some very rough numbers: LLD is improving the overall build time of
This causes an issue when trying to build with `make LD=ld.lld` if
ld.lld and the rest of your cross tools aren't in the same directory
(ex. /usr/local/bin) (as is the case for Android's build system), as the
GCC_TOOLCHAIN_DIR then gets set based on `which $(LD)` which will point
where LLVM tools a
For arm64:
0.34% size improvement with lld -O2 over lld for vmlinux.
3.3% size improvement with lld -O2 over lld for Image.lz4-dtb.
Link: https://github.com/ClangBuiltLinux/linux/issues/343
Suggested-by: Rui Ueyama
Suggested-by: Nathan Chancellor
Reviewed-by: Nathan Chancellor
Tested-by: Nathan
Similar to how we differentiate between CONFIG_CC_IS_GCC and
CONFIG_CC_IS_CLANG, add CONFIG_LD_IS_BFD, CONFIG_LD_IS_GOLD, and
CONFIG_LD_IS_LLD.
This simiplifies patches to Makefiles that need to do different things
for different linkers.
Cc: Nathan Chancellor
Cc: Sami Tolvanen
Signed-off-by: Ni
-O2 enables tail merging of string table strings.
For arm64:
0.34% size improvement with lld -O2 over lld for vmlinux.
3.30% size improvement with lld -O2 over lld for Image.lz4-dtb.
Link: https://github.com/ClangBuiltLinux/linux/issues/343
Suggested-by: Rui Ueyama
Suggested-by: Nathan Chancello
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=$(LD). This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.
Link: https://github.com/ClangBuiltLinux/linux/issues/342
This causes an issue when trying to build with `make LD=ld.lld` if
ld.lld and the rest of your cross tools aren't in the same directory
(ex. /usr/local/bin) (as is the case for Android's build system), as the
GCC_TOOLCHAIN_DIR then gets set based on `which $(LD)` which will point
where LLVM tools a
This patch cleans up a few places in the Makefile to make way for
landing LLD support in the kernel. There are still a few arch specific
fixes that need to get upstreamed, but this core set of patches should
be arch independent.
Some very rough numbers: LLD is improving the overall build time of
arch/x86/Makefile disables SSE and SSE2 for the whole kernel. The
AMDGPU drivers modified in this patch re-enable SSE but not SSE2. Turn
on SSE2 to support emitting double precision floating point instructions
rather than calls to non-existent (usually available from gcc_s or
compiler_rt) floatin
Date: Thu, 11 Jun 2020 15:38:38 -0700
From: Nick Desaulniers
To: Michael Ellerman ,
christophe.le...@c-s.fr, seg...@kernel.crashing.org
Cc: Christophe Leroy ,
Benjamin Herrenschmidt ,
Paul Mackerras , npig...@gmail.com,
seg...@kernel.crashing.org, linuxppc-...@list
25 matches
Mail list logo