[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100530170346.GC1565@liondog.tnic>
Date: Sun, 30 May 2010 19:03:46 +0200
From: Borislav Petkov <bp@...en8.de>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Borislav Petkov <borislav.petkov@....com>,
Toralf Förster <toralf.foerster@....de>,
user-mode-linux-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: [PATCH] x86, hweight: Fix UML boot crash
Obviously UML cannot stomach callee reg-saving trickery
introduced with d61931d89be506372d01a90d1755f6d0a9fafe2d (x86:
Add optimized popcnt variants) and oopses during boot:
http://marc.info/?l=linux-kernel&m=127522065202435&w=2
Go ahead and fall back to the software hweight* routines on UML.
LKML-Reference: <201005271944.09541.toralf.foerster@....de>
Tested-by: Toralf Förster <toralf.foerster@....de>
Tested-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Signed-off-by: Borislav Petkov <bp@...en8.de>
---
arch/x86/include/asm/bitops.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
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>
--
1.7.1
--
Regards/Gruss,
Boris.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists