Commit 2522333a authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

[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.
parent 9eedaf2a
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/mmzone.h> #include <linux/mmzone.h>
#include <linux/rbtree.h> #include <linux/rbtree.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/elf.h>
#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
extern unsigned long max_mapnr; extern unsigned long max_mapnr;
...@@ -644,24 +643,8 @@ kernel_map_pages(struct page *page, int numpages, int enable) ...@@ -644,24 +643,8 @@ kernel_map_pages(struct page *page, int numpages, int enable)
#endif #endif
#ifndef CONFIG_ARCH_GATE_AREA #ifndef CONFIG_ARCH_GATE_AREA
static inline int in_gate_area(struct task_struct *task, unsigned long addr) extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
{ 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
}
#endif #endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <linux/swapops.h> #include <linux/swapops.h>
#include <linux/elf.h>
#ifndef CONFIG_DISCONTIGMEM #ifndef CONFIG_DISCONTIGMEM
/* use the per-pgdat data instead for discontigmem - mbligh */ /* use the per-pgdat data instead for discontigmem - mbligh */
...@@ -1688,7 +1689,9 @@ struct page * vmalloc_to_page(void * vmalloc_addr) ...@@ -1688,7 +1689,9 @@ struct page * vmalloc_to_page(void * vmalloc_addr)
EXPORT_SYMBOL(vmalloc_to_page); 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; struct vm_area_struct gate_vma;
static int __init gate_vma_init(void) static int __init gate_vma_init(void)
...@@ -1702,3 +1705,23 @@ static int __init gate_vma_init(void) ...@@ -1702,3 +1705,23 @@ static int __init gate_vma_init(void)
} }
__initcall(gate_vma_init); __initcall(gate_vma_init);
#endif #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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment