Pull acpi_bus_register_driver into release branch
[pandora-kernel.git] / arch / x86_64 / ia32 / ia32_binfmt.c
index 029bdda..926c474 100644 (file)
@@ -58,7 +58,7 @@ struct elf_phdr;
 
 #define USE_ELF_CORE_DUMP 1
 
-/* Overwrite elfcore.h */ 
+/* Override elfcore.h */ 
 #define _LINUX_ELFCORE_H 1
 typedef unsigned int elf_greg_t;
 
@@ -293,8 +293,6 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int
 } while(0) 
 
 
-#define elf_map elf32_map
-
 #include <linux/module.h>
 
 MODULE_DESCRIPTION("Binary format loader for compatibility with IA32 ELF binaries."); 
@@ -341,7 +339,7 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top,
        struct mm_struct *mm = current->mm;
        int i, ret;
 
-       stack_base = IA32_STACK_TOP - MAX_ARG_PAGES * PAGE_SIZE;
+       stack_base = stack_top - MAX_ARG_PAGES * PAGE_SIZE;
        mm->arg_start = bprm->p + stack_base;
 
        bprm->p += stack_base;
@@ -359,7 +357,7 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top,
        {
                mpnt->vm_mm = mm;
                mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
-               mpnt->vm_end = IA32_STACK_TOP;
+               mpnt->vm_end = stack_top;
                if (executable_stack == EXSTACK_ENABLE_X)
                        mpnt->vm_flags = VM_STACK_FLAGS |  VM_EXEC;
                else if (executable_stack == EXSTACK_DISABLE_X)
@@ -390,21 +388,6 @@ int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top,
 }
 EXPORT_SYMBOL(ia32_setup_arg_pages);
 
-static unsigned long
-elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type)
-{
-       unsigned long map_addr;
-       struct task_struct *me = current; 
-
-       down_write(&me->mm->mmap_sem);
-       map_addr = do_mmap(filep, ELF_PAGESTART(addr),
-                          eppnt->p_filesz + ELF_PAGEOFFSET(eppnt->p_vaddr), prot, 
-                          type,
-                          eppnt->p_offset - ELF_PAGEOFFSET(eppnt->p_vaddr));
-       up_write(&me->mm->mmap_sem);
-       return(map_addr);
-}
-
 #ifdef CONFIG_SYSCTL
 /* Register vsyscall32 into the ABI table */
 #include <linux/sysctl.h>