]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix x86-64 compilation on 2.6.2-bk1
authorAndrew Morton <akpm@osdl.org>
Fri, 6 Feb 2004 00:52:22 +0000 (16:52 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 6 Feb 2004 00:52:22 +0000 (16:52 -0800)
From: Andi Kleen <ak@suse.de>

The new linux/elf.h include in linux/mm.h caused all kinds of problems for
the x86-64 32bit emulation code.  This patch avoids the dependency by
moving the depending functions out of line.  It makes x86-64 compile again.

include/linux/mm.h
mm/memory.c

index ffc1e13d0a5561a02d23012ddb3bf0ede7604739..d21630b8f96db182d4e69f7ad98fdd499c3b1399 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/mmzone.h>
 #include <linux/rbtree.h>
 #include <linux/fs.h>
-#include <linux/elf.h>
 
 #ifndef CONFIG_DISCONTIGMEM          /* Don't use mapnrs, do it properly */
 extern unsigned long max_mapnr;
@@ -644,24 +643,8 @@ kernel_map_pages(struct page *page, int numpages, int enable)
 #endif
 
 #ifndef CONFIG_ARCH_GATE_AREA
-static inline int in_gate_area(struct task_struct *task, unsigned long addr)
-{
-#ifdef AT_SYSINFO_EHDR
-       if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END))
-               return 1;
-#endif
-       return 0;
-}
-
-extern struct vm_area_struct gate_vma;
-static inline struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
-{
-#ifdef AT_SYSINFO_EHDR
-       return &gate_vma;
-#else
-       return 0;
-#endif
-}
+extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
+int in_gate_area(struct task_struct *task, unsigned long addr);
 #endif
 
 #endif /* __KERNEL__ */
index d0c834a8ce97649df37c6185f52d0c6eec4ea0bb..e7295619df6912b2ab4851b1e151eabb35d5d95e 100644 (file)
@@ -55,6 +55,7 @@
 #include <asm/pgtable.h>
 
 #include <linux/swapops.h>
+#include <linux/elf.h>
 
 #ifndef CONFIG_DISCONTIGMEM
 /* use the per-pgdat data instead for discontigmem - mbligh */
@@ -1688,7 +1689,9 @@ struct page * vmalloc_to_page(void * vmalloc_addr)
 
 EXPORT_SYMBOL(vmalloc_to_page);
 
-#if !defined(CONFIG_ARCH_GATE_AREA) && defined(AT_SYSINFO_EHDR)
+#if !defined(CONFIG_ARCH_GATE_AREA)
+
+#if defined(AT_SYSINFO_EHDR)
 struct vm_area_struct gate_vma;
 
 static int __init gate_vma_init(void)
@@ -1702,3 +1705,23 @@ static int __init gate_vma_init(void)
 }
 __initcall(gate_vma_init);
 #endif
+
+struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
+{
+#ifdef AT_SYSINFO_EHDR
+       return &gate_vma;
+#else
+       return 0;
+#endif
+}
+
+int in_gate_area(struct task_struct *task, unsigned long addr)
+{
+#ifdef AT_SYSINFO_EHDR
+       if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END))
+               return 1;
+#endif
+       return 0;
+}
+
+#endif