[PATCH] lib/int_sqrt.c: optimize for small argument values

2017-10-19 Thread Michael Davidson
than it currently is. Signed-off-by: Michael Davidson --- lib/int_sqrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c index 1ef4cc344977..8394b0dcecd4 100644 --- a/lib/int_sqrt.c +++ b/lib/int_sqrt.c @@ -21,7 +21,7 @@ unsigned long int_sqrt

[tip:x86/urgent] x86/boot: #undef memcpy() et al in string.c

2017-07-25 Thread tip-bot for Michael Davidson
Commit-ID: 18d5e6c34a8eda438d5ad8b3b15f42dab01bf05d Gitweb: http://git.kernel.org/tip/18d5e6c34a8eda438d5ad8b3b15f42dab01bf05d Author: Michael Davidson AuthorDate: Mon, 24 Jul 2017 16:51:55 -0700 Committer: Ingo Molnar CommitDate: Tue, 25 Jul 2017 11:13:55 +0200 x86/boot: #undef

Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm"

2017-07-13 Thread Michael Davidson
On Thu, Jul 13, 2017 at 12:25 PM, Josh Poimboeuf wrote: > > Anyway this seems like a clang bug to me. If I specify RSP as an input > register then the compiler shouldn't overwrite it first. For that > matter it has no reason to overwrite it if it's an output register > either. > It's certainly

Re: [tip:x86/urgent] x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility

2017-05-05 Thread Michael Davidson
On Fri, May 5, 2017 at 12:30 PM, Linus Torvalds wrote: > On Fri, May 5, 2017 at 11:44 AM, Matthias Kaehlcke wrote: >> >> Indeed, I expect 4.12 (with this patch ...) to build with Clang for a >> x86 defconfig (with tons of warnings). ARM64 is very close. > > Does it actually *work*, rather than ju

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

2017-04-05 Thread Michael Davidson
btle 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 wrote: > Hi Masahiro, > > El Thu, Apr 06, 2017 at 03:08:26AM +0900 Masahiro Yamada ha dit: > >>

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 stack; I feel that dese

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

2017-03-16 Thread Michael Davidson
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 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 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index b841fb36beb2..b21fd0ca2946 100644 --- a/Makefile +++ b/Makefile @@ -704,6 +704,8 @@ KBUILD_CFLAGS

[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 --- 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

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

2017-03-16 Thread Michael Davidson
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 --- arch/x86/boot/copy.S | 15 +-- arch/x86/boot/string.h | 13 + 2 files changed, 26

[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 --- drivers/md/raid10.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c

[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 --- arch/x86/Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a

[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 --- Makefile | 2 ++ arch/x86/Makefile | 2 ++ 2 files

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

2017-03-16 Thread Michael Davidson
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 --- 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 index 5457b02

Re: [PATCH 2/2] x86, boot: Use regparm=0 for memcpy and memset when using clang

2017-03-16 Thread Michael Davidson
On Thu, Mar 16, 2017 at 12:46 AM, Ingo Molnar wrote: > > I don't think we want to add such ugly workarounds for clang bugs in a > piecemail > wise manner. If this was the _only_ workaround required to have a working > kernel > built with clang then maybe, but there's no way to tell from this sub

[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 --- 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_ctrby8_avx-x86_64.S index

[PATCH 1/2] x86, boot: #undef memcpy etc in string.c

2017-03-15 Thread Michael Davidson
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 --- 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 index 5457b02

[PATCH 2/2] x86, boot: Use regparm=0 for memcpy and memset when using clang

2017-03-15 Thread Michael Davidson
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 --- arch/x86/boot/copy.S | 15 +-- arch/x86/boot/string.h | 13 + 2 files changed, 26

[PATCH] binfmt_elf: Fix bug in loading of PIE binaries.

2015-04-13 Thread Michael Davidson
ze of the binary in the same way as load_elf_interp(). Signed-off-by: Michael Davidson --- fs/binfmt_elf.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 995986b..d925f55 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_e

[tip:x86/build] x86, relocs: Add manual debug mode

2014-01-22 Thread tip-bot for Michael Davidson
Commit-ID: 214a88768d34079b70e0f2ba37b91a3b717fddbb Gitweb: http://git.kernel.org/tip/214a88768d34079b70e0f2ba37b91a3b717fddbb Author: Michael Davidson AuthorDate: Tue, 21 Jan 2014 12:32:23 -0800 Committer: H. Peter Anvin CommitDate: Wed, 22 Jan 2014 04:21:45 -0800 x86, relocs: Add

[tip:x86/build] x86, relocs: Add manual debug mode

2014-01-21 Thread tip-bot for Michael Davidson
Commit-ID: 4cac7bb27b772924d5c6ac6caaa1ba9e929e8199 Gitweb: http://git.kernel.org/tip/4cac7bb27b772924d5c6ac6caaa1ba9e929e8199 Author: Michael Davidson AuthorDate: Tue, 21 Jan 2014 12:32:23 -0800 Committer: H. Peter Anvin CommitDate: Tue, 21 Jan 2014 12:41:48 -0800 x86, relocs: Add

[tip:x86/kaslr] x86, relocs: Add more per-cpu gold special cases

2013-10-13 Thread tip-bot for Michael Davidson
Commit-ID: d751c169e9a6f0f853346f1184881422bd10b3c2 Gitweb: http://git.kernel.org/tip/d751c169e9a6f0f853346f1184881422bd10b3c2 Author: Michael Davidson AuthorDate: Thu, 10 Oct 2013 18:39:54 -0700 Committer: H. Peter Anvin CommitDate: Sun, 13 Oct 2013 03:11:57 -0700 x86, relocs: Add