Linux 2.6.17.11 - fix compilation error on IA64
PATCH 1/1 Linux 2.6.17.11 - fix compilation error on IA64
The commit 8833ebaa3f4325820fe3338ccf6fae04f6669254 introduced a change that makes the compilation of a IA64 kernel fail as follows:
GEN usr/initramfs_data.cpio.gz AS usr/initramfs_data.o LD usr/built-in.o CC arch/ia64/kernel/acpi.o AS arch/ia64/kernel/entry.o
include/asm/mman.h: Assembler messages:include/asm/mman.h:13: Error: Unknown opcode int ia64_map_check_rgn(unsigned long addr,unsigned long len,' include/asm/mman.h:14: Error: Unknown opcode unsigned long flags)'
make[1]: *** [arch/ia64/kernel/entry.o] Error 1
make: *** [arch/ia64/kernel] Error 2
This patch fixes this.
---
include/asm-ia64/mman.h +1 -1
@@ -8,7 +8,7 @@* David Mosberger-Tang <[email protected]>, Hewlett-Packard Co */ -#ifdef __KERNEL__ +#ifndef __ASSEMBLY__#define arch_mmap_check ia64_map_check_rgnint ia64_map_check_rgn (unsigned long addr,unsigned long len,unsigned long flags);
PATCH 1/1 Linux 2.6.17.11 - fix compilation error on IA64 (try #2)
Hi all!
I am resending this patch because I removed the "#ifdef __KERNEL__" protection in the previous version by mistake.
---
The commit 8833ebaa3f4325820fe3338ccf6fae04f6669254 introduced a change that makes the compilation of a IA64 kernel fail as shown below:
gcc -Wp,-MD,arch/ia64/kernel/.entry.o.d -nostdinc -isystem /usr/lib/gcc/ia64-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -DHAVE_WORKING_TEXT_ALIGN -DHAVE_MODEL_SMALL_ATTRIBUTE -DHAVE_SERIALIZE_DIRECTIVE -D__ASSEMBLY__ -mconstant-gp -c -o arch/ia64/kernel/entry.o arch/ia64/kernel/entry.Sinclude/asm/mman.h: Assembler messages:include/asm/mman.h:13: Error: Unknown opcode int ia64_map_check_rgn(unsigned long addr,unsigned long len,' include/asm/mman.h:14: Error: Unknown opcode unsigned long flags)'
make[1]: *** [arch/ia64/kernel/entry.o] Error 1
make: *** [arch/ia64/kernel] Error 2
The reason is that "asm/mman.h" is being included from entry.S indirectly through "asm/pgtable.h" (see code snips below).
* arch/ia64/kernel/entry.S:
...
#include <asm/pgtable.h>
...
* include/asm-ia64/pgtable.h:
...
#include <asm/mman.h>
...
* include/asm-ia64/mman.h
...
#ifdef __KERNEL__
#define arch_mmap_check ia64_map_check_rgn
int ia64_map_check_rgn(unsigned long addr, unsigned long len,
unsigned long flags);
#endif
...
---
include/asm-ia64/mman.h +2 -0
@@ -9,10 +9,12 @@*/ #ifdef __KERNEL__ +#ifndef __ASSEMBLY__#define arch_mmap_check ia64_map_check_rgnint ia64_map_check_rgn (unsigned long addr,unsigned long len,unsigned long flags);#endif +#endif #include <asm-generic/mman.h>