From: Borislav Petkov <bp@alien8.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Toralf Förster" <toralf.foerster@gmx.de>,
"Borislav Petkov" <borislav.petkov@amd.com>,
"H. Peter Anvin" <hpa@zytor.com>,
user-mode-linux-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: current git kernel crashes UML system during boot
Date: Sun, 30 May 2010 17:02:14 +0200 [thread overview]
Message-ID: <20100530150214.GA1565@liondog.tnic> (raw)
In-Reply-To: <AANLkTimKwxYxM_PExplIDK1WPTQ9e_-CHn5SnIvfjfUg@mail.gmail.com>
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Sun, May 30, 2010 at 01:57:05PM +0200
> On Sun, May 30, 2010 at 13:39, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > 2010/5/27 Toralf Förster <toralf.foerster@gmx.de>:
> >> I bisected it to this :
>
> > After fixing the missing/superfluous slab inclusion issues, I bisected
> > it further to
> >
> > commit d61931d89be506372d01a90d1755f6d0a9fafe2d
> > Author: Borislav Petkov <borislav.petkov@amd.com>
> > Date: Fri Mar 5 17:34:46 2010 +0100
> >
> > x86: Add optimized popcnt variants
> >
> > Add support for the hardware version of the Hamming weight function,
> > popcnt, present in CPUs which advertize it under CPUID, Function
> > 0x0000_0001_ECX[23]. On CPUs which don't support it, we fallback to the
> > default lib/hweight.c sw versions.
> >
> > A synthetic benchmark comparing popcnt with __sw_hweight64 showed almost
> > a 3x speedup on a F10h machine.
> >
> > Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
> > LKML-Reference: <20100318112015.GC11152@aftab>
> > Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> >
> > I reverted that commit on top of current mainline (and fixed up the
> > conflicts), and now
> > it boots again.
>
> I tried adding
>
> config ARCH_HWEIGHT_CFLAGS
> string
> default "-fcall-saved-ecx -fcall-saved-edx" if !64_BIT
> default "-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx
> -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10
> -fcall-saved-r11" if 64_BIT
>
> to arch/um/Kconfig.x86. Now it got a bit further, but it still crashes:
Ok, this is a kinda stab in the dark but from what I could decypher
from the include hell, one possible fix should be if UML didn't include
<arch/x86/include/asm/arch_hweight.h> but use the software hweight
version only.
Can you guys check whether the following fixes the issue?
Thanks.
--
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index 545776e..c9dad12 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -444,7 +444,11 @@ static inline int fls(int x)
#define ARCH_HAS_FAST_MULTIPLIER 1
+#ifdef CONFIG_UML
+#include <asm-generic/bitops/arch_hweight.h>
+#else
#include <asm/arch_hweight.h>
+#endif
#include <asm-generic/bitops/const_hweight.h>
--
Regards/Gruss,
Boris.
next prev parent reply other threads:[~2010-05-30 15:02 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 17:44 current git kernel crashes UML system during boot Toralf Förster
2010-05-30 11:39 ` Geert Uytterhoeven
2010-05-30 11:57 ` Geert Uytterhoeven
2010-05-30 15:02 ` Borislav Petkov [this message]
2010-05-30 15:18 ` Geert Uytterhoeven
2010-05-30 15:46 ` Borislav Petkov
2010-05-30 15:28 ` Toralf Förster
2010-05-30 17:03 ` [PATCH] x86, hweight: Fix UML boot crash Borislav Petkov
2010-05-30 18:36 ` H. Peter Anvin
2010-05-30 19:39 ` Borislav Petkov
2010-05-30 20:17 ` Borislav Petkov
2010-05-30 21:09 ` H. Peter Anvin
2010-06-12 13:34 ` [uml-devel] " Paolo Giarrusso
2010-06-12 14:18 ` Borislav Petkov
2010-06-12 16:01 ` Paolo Giarrusso
2010-06-12 16:34 ` Borislav Petkov
2010-06-12 18:37 ` Geert Uytterhoeven
2010-06-13 6:58 ` Borislav Petkov
2010-05-31 13:55 ` Toralf Förster
2010-05-31 14:10 ` Borislav Petkov
2010-05-31 14:36 ` Toralf Förster
2010-06-14 9:49 ` Toralf Förster
2010-06-14 10:26 ` [uml-devel] " Paolo Giarrusso
2010-06-14 12:54 ` Toralf Förster
2010-06-14 13:00 ` Borislav Petkov
2010-06-14 13:44 ` Toralf Förster
2010-06-14 14:39 ` Geert Uytterhoeven
2010-06-14 15:11 ` Toralf Förster
2010-06-14 15:20 ` H. Peter Anvin
2010-05-31 14:25 ` [uml-devel] " Boaz Harrosh
2010-05-31 2:32 ` Jeff Dike
2010-05-31 13:51 ` Borislav Petkov
2010-05-31 15:56 ` Jeff Dike
2010-05-31 16:29 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100530150214.GA1565@liondog.tnic \
--to=bp@alien8.de \
--cc=borislav.petkov@amd.com \
--cc=geert@linux-m68k.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=toralf.foerster@gmx.de \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox