]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: Fix BUG/WARN macros for 64-bit
authorPaul Mackerras <paulus@samba.org>
Tue, 1 Nov 2005 10:54:38 +0000 (21:54 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 1 Nov 2005 10:54:38 +0000 (21:54 +1100)
The bug_entry struct had an int in the middle of pointers and unsigned
longs, and the inline asm that generated the bug table entries didn't
insert the necessary padding, so the fields following it didn't get
initialized properly and an oops resulted.  This changes the int field
(the line number) to a long so that all the fields are the same size
and no padding is required.

Signed-off-by: Paul Mackerras <paulus@samba.org>
include/asm-powerpc/bug.h

index e4d028e8702042d3573117b53241dfda23f48fab..943e3d7dbcc702aec0bbf8e163d57f868a84b439 100644 (file)
@@ -13,7 +13,7 @@
 
 #ifdef __powerpc64__
 #define BUG_TABLE_ENTRY(label, line, file, func) \
-       ".llong " #label "\n .long " #line "\n .llong " #file ", " #func "\n"
+       ".llong " #label ", " #line ", " #file ", " #func "\n"
 #define TRAP_OP(ra, rb) "1: tdnei " #ra ", " #rb "\n"
 #define DATA_TYPE long long
 #else 
@@ -25,7 +25,7 @@
 
 struct bug_entry {
        unsigned long   bug_addr;
-       int             line;
+       long            line;
        const char      *file;
        const char      *function;
 };