From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 30 May 2010 17:02:14 +0200 From: Borislav Petkov Subject: Re: current git kernel crashes UML system during boot Message-ID: <20100530150214.GA1565@liondog.tnic> References: <201005271944.09541.toralf.foerster@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Geert Uytterhoeven Cc: Toralf =?utf-8?Q?F=C3=B6rster?= , Borislav Petkov , "H. Peter Anvin" , user-mode-linux-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org List-ID: From: Geert Uytterhoeven Date: Sun, May 30, 2010 at 01:57:05PM +0200 > On Sun, May 30, 2010 at 13:39, Geert Uytterhoeven wrote: > > 2010/5/27 Toralf Förster : > >> I bisected it to this : > > > After fixing the missing/superfluous slab inclusion issues, I bisected > > it further to > > > > commit d61931d89be506372d01a90d1755f6d0a9fafe2d > > Author: Borislav Petkov > > 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 > >    LKML-Reference: <20100318112015.GC11152@aftab> > >    Signed-off-by: H. Peter Anvin > > > > 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 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 +#else #include +#endif #include -- Regards/Gruss, Boris.