The patch titled
ppc64: Fix issue with gcc 4.0 compiled kernels
has been added to the -mm tree. Its filename is
ppc64-fix-issue-with-gcc-40-compiled-kernels.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
ppc64-fix-issue-with-gcc-40-compiled-kernels.patch
ppc64-remove-nested-feature-sections.patch
ppc64-add-vmx-save-flag-to-vpa.patch
ppc64-large-initrd-causes-kernel-not-to-boot.patch
From: Anton Blanchard <[EMAIL PROTECTED]>
I recently had a BUG_ON() go off spuriously on a gcc 4.0 compiled kernel.
It turns out gcc-4.0 was removing a sign extension while earlier gcc
versions would not. Thinking this to be a compiler bug, I submitted a
report:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23422
It turns out we need to cast the input in order to tell gcc to sign extend
it.
Thanks to Andrew Pinski for his help on this bug.
Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]>
Cc: Paul Mackerras <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
include/asm-ppc64/bug.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff -puN include/asm-ppc64/bug.h~ppc64-fix-issue-with-gcc-40-compiled-kernels
include/asm-ppc64/bug.h
--- devel/include/asm-ppc64/bug.h~ppc64-fix-issue-with-gcc-40-compiled-kernels
2005-08-22 22:46:10.000000000 -0700
+++ devel-akpm/include/asm-ppc64/bug.h 2005-08-22 22:46:10.000000000 -0700
@@ -43,8 +43,8 @@ struct bug_entry *find_bug(unsigned long
".section __bug_table,\"a\"\n\t" \
" .llong 1b,%1,%2,%3\n" \
".previous" \
- : : "r" (x), "i" (__LINE__), "i" (__FILE__), \
- "i" (__FUNCTION__)); \
+ : : "r" ((long long)(x)), "i" (__LINE__), \
+ "i" (__FILE__), "i" (__FUNCTION__)); \
} while (0)
#define WARN_ON(x) do { \
@@ -53,7 +53,8 @@ struct bug_entry *find_bug(unsigned long
".section __bug_table,\"a\"\n\t" \
" .llong 1b,%1,%2,%3\n" \
".previous" \
- : : "r" (x), "i" (__LINE__ + BUG_WARNING_TRAP), \
+ : : "r" ((long long)(x)), \
+ "i" (__LINE__ + BUG_WARNING_TRAP), \
"i" (__FILE__), "i" (__FUNCTION__)); \
} while (0)
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html