Messages in this thread Patch in this message | | | Date | Tue, 18 Oct 2005 11:03:24 -0500 | From | Jon Mason <> | Subject | [PATCH] build break in include/asm-x86_64/atomic.h |
| |
While building the latest -mm kernel on x86-64, I hit a build break (see below).
.... CC [M] fs/ntfs/namei.o In file included from include/linux/dcache.h:6, from fs/ntfs/namei.c:23: include/asm/atomic.h:383: error: parse error before '*' token include/asm/atomic.h:384: warning: function declaration isn't a prototype include/asm/atomic.h: In function `atomic_scrub': include/asm/atomic.h:385: error: `u32' undeclared (first use in this function) include/asm/atomic.h:385: error: (Each undeclared identifier is reported only once include/asm/atomic.h:385: error: for each function it appears in.) include/asm/atomic.h:385: error: parse error before "i" include/asm/atomic.h:386: error: `i' undeclared (first use in this function) include/asm/atomic.h:386: error: `size' undeclared (first use in this function) include/asm/atomic.h:386: error: `virt_addr' undeclared (first use in this function) include/asm/atomic.h:386: warning: left-hand operand of comma expression has no effect make[2]: *** [fs/ntfs/namei.o] Error 1 make[1]: *** [fs/ntfs] Error 2 make: *** [fs] Error 2
The problem is the atomic_scrub function is attempting to use 'u32', which is not defined at this point. If the 'u32's are defined (by including <asm/types.h>) or changed to 'unsigned int', there is no problem (and the kernel compiles, boots, and runs perfectly).
Below is a patch which changes the 'u32' to 'unsigned int'.
Signed-off-by: Jon Mason <jdmason@us.ibm.com>
--- linux-2.6.14-rc4-mm1/include/asm-x86_64/atomic.h.orig 2005-10-18 08:42:38.000000000 -0500 +++ linux-2.6.14-rc4-mm1/include/asm-x86_64/atomic.h 2005-10-18 08:24:20.000000000 -0500 @@ -380,9 +380,9 @@ __asm__ __volatile__(LOCK "orl %0,%1" \ /* ECC atomic, DMA, SMP and interrupt safe scrub function */ -static __inline__ void atomic_scrub(u32 *virt_addr, u32 size) +static __inline__ void atomic_scrub(unsigned int *virt_addr, unsigned int size) { - u32 i; + unsigned int i; for (i = 0; i < size / 4; i++, virt_addr++) /* Very carefully read and write to memory atomically * so we are interrupt, DMA and SMP safe. - 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/
| |