[PATCH] crypto, x86: aesni - fix token pasting for clang

2017-03-15 Thread Michael Davidson
so we can just get rid of the preprocessor macros. Signed-off-by: Michael Davidson <m...@google.com> --- arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/crypto/aes_ctrby8_avx-x86_64.S b/arch/x86/crypto/aes_ctrb

Re: [PATCH 6/7] md/raid10, LLVM: get rid of variable length array

2017-03-17 Thread Michael Davidson
On Fri, Mar 17, 2017 at 5:44 AM, Peter Zijlstra wrote: > > Be that as it may; what you construct above is disgusting. Surely the > code can be refactored to not look like dog vomit? > > Also; its not immediately obvious conf->copies is 'small' and this > doesn't blow up the

[PATCH 6/7] md/raid10, LLVM: get rid of variable length array

2017-03-16 Thread Michael Davidson
Replace a variable length array in a struct by allocating the memory for the entire struct in a char array on the stack. Signed-off-by: Michael Davidson <m...@google.com> --- drivers/md/raid10.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/md/raid

[PATCH 7/7] crypto, x86, LLVM: aesni - fix token pasting

2017-03-16 Thread Michael Davidson
so it seems preferable to let it do so and to get rid or the CONCAT(), DDQ() and XMM() preprocessor macros. Signed-off-by: Michael Davidson <m...@google.com> --- arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/x86/

[PATCH 1/7] Makefile, LLVM: add -no-integrated-as to KBUILD_[AC]FLAGS

2017-03-16 Thread Michael Davidson
Add -no-integrated-as to KBUILD_AFLAGS and KBUILD_CFLAGS for clang. Signed-off-by: Michael Davidson <m...@google.com> --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index b841fb36beb2..b21fd0ca2946 100644 --- a/Makefile +++ b/Makefile @@ -704,6

[PATCH 5/7] x86, boot, LLVM: Use regparm=0 for memcpy and memset

2017-03-16 Thread Michael Davidson
and memset that it generates (eg for structure assignments and initialization) even if an alternate calling convention such as regparm=3 has been specified. Signed-off-by: Michael Davidson <m...@google.com> --- arch/x86/boot/copy.S | 15 +-- arch/x86/boot/string.h | 13 ++

[PATCH 0/7] LLVM: make x86_64 kernel build with clang.

2017-03-16 Thread Michael Davidson
, such as the complaints about implict conversions between enumerated types may be candidates for just being disabled. Michael Davidson (7): Makefile, LLVM: add -no-integrated-as to KBUILD_[AC]FLAGS Makefile, x86, LLVM: disable unsupported optimization flags x86, LLVM: suppress clang warnings about

[PATCH 3/7] x86, LLVM: suppress clang warnings about unaligned accesses

2017-03-16 Thread Michael Davidson
Suppress clang warnings about potential unaliged accesses to members in packed structs. This gets rid of almost 10,000 warnings about accesses to the ring 0 stack pointer in the TSS. Signed-off-by: Michael Davidson <m...@google.com> --- arch/x86/Makefile | 5 + 1 file changed, 5 inse

[PATCH 4/7] x86, boot, LLVM: #undef memcpy etc in string.c

2017-03-16 Thread Michael Davidson
it), but clang does not. Adding these #undef's appears to preserve what I assume was the original intent of the code. Signed-off-by: Michael Davidson <m...@google.com> --- arch/x86/boot/string.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c

[PATCH 2/7] Makefile, x86, LLVM: disable unsupported optimization flags

2017-03-16 Thread Michael Davidson
Unfortunately, while clang generates a warning about these flags being unsupported it still exits with a status of 0 so we have to explicitly disable them instead of just using a cc-option check. Signed-off-by: Michael Davidson <m...@google.com> --- Makefile | 2 ++ arch/x86/Ma

Re: [PATCH 2/7] Makefile, x86, LLVM: disable unsupported optimization flags

2017-04-05 Thread Michael Davidson
change from existing behavior (and a trap that I almost immediately fell into after applying a similar patch). On Wed, Apr 5, 2017 at 12:01 PM, Matthias Kaehlcke <m...@chromium.org> wrote: > Hi Masahiro, > > El Thu, Apr 06, 2017 at 03:08:26AM +0900 Masahiro Yamada ha dit: > >>