summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-02-05 16:52:22 -0800
committerGreg Kroah-Hartman <greg@kroah.com>2004-02-05 16:52:22 -0800
commit2522333aaeccf23749c20c29b2f1085e9d995ed4 (patch)
treeac89185fd81d3d0f1db5cb0abb8c908915861b07
parent9eedaf2a7f5ee23083c182ef067d8180c535c9d6 (diff)
[PATCH] Fix x86-64 compilation on 2.6.2-bk1
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.
-rw-r--r--include/linux/mm.h21
-rw-r--r--mm/memory.c25
2 files changed, 26 insertions, 20 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ffc1e13d0a55..d21630b8f96d 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -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__ */
diff --git a/mm/memory.c b/mm/memory.c
index d0c834a8ce97..e7295619df69 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -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