lkml.org 
[lkml]   [2010]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [tip:x86/urgent] x86, hweight: Fix UML boot crash
Note: I have applied this  because it fixes a regression, but it bugs
the living bejeezus out of me that the saner patch:

diff --git a/arch/um/include/asm/arch_hweight.h
b/arch/um/include/asm/arch_hweight.h
new file mode 100644
index 0000000..c656cf4
--- /dev/null
+++ b/arch/um/include/asm/arch_hweight.h
@@ -0,0 +1,6 @@
+#ifndef _ASM_UM_HWEIGHT_H
+#define _ASM_UM_HWEIGHT_H
+
+#include <asm-generic/bitops/arch_hweight.h>
+
+#endif
... supposedly didn't work. As such, I consider this a temporary kluge
until a proper solution is found. From a code-cleanliness perspective,
this patch is awful.

-hpa


On 06/09/2010 03:07 PM, tip-bot for Borislav Petkov wrote:
> Commit-ID: cc7f0a7b3004a4ca0bfef0e1ca79f2e0da6ca1b0
> Gitweb: http://git.kernel.org/tip/cc7f0a7b3004a4ca0bfef0e1ca79f2e0da6ca1b0
> Author: Borislav Petkov <bp@alien8.de>
> AuthorDate: Sun, 30 May 2010 19:03:46 +0200
> Committer: H. Peter Anvin <hpa@linux.intel.com>
> CommitDate: Wed, 9 Jun 2010 14:23:29 -0700
>
> x86, hweight: Fix UML boot crash
>
> UML apparently cannot stomach callee reg-saving trickery introduced
> with d61931d89be506372d01a90d1755f6d0a9fafe2d (x86: Add optimized
> popcnt variants) for reasons currently unknown, 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@gmx.de>
> Tested-by: Toralf Förster <toralf.foerster@gmx.de>
> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> LKML-Reference: <20100530170346.GC1565@liondog.tnic>
> Signed-off-by: Borislav Petkov <bp@alien8.de>
> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
> Cc: Boaz Harrosh <bharrosh@panasas.com>
> Cc: Jeff Dike <jdike@addtoit.com>
> Cc: Andrew Morgon <akpm@linux-foundation.org>
> ---
> 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>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-06-10 00:45    [from the cache]
©2003-2011 Jasper Spaans