diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2011-08-18 20:06:39 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2011-11-02 14:15:05 +0100 |
commit | 5c48b108ecbf6505d929e64d50dace13ac2bdf34 (patch) | |
tree | 016904f84fbe05aa301c5cdfe712d90f6bb828fe /arch/um/sys-x86/mem_32.c | |
parent | 7bbe7204e93734fe79d8aac3e08a7cb4624b5004 (diff) |
um: take arch/um/sys-x86 to arch/x86/um
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/sys-x86/mem_32.c')
-rw-r--r-- | arch/um/sys-x86/mem_32.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/arch/um/sys-x86/mem_32.c b/arch/um/sys-x86/mem_32.c deleted file mode 100644 index 639900a6fde9..000000000000 --- a/arch/um/sys-x86/mem_32.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2011 Richard Weinberger <richrd@nod.at> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/mm.h> -#include <asm/page.h> -#include <asm/mman.h> - -static struct vm_area_struct gate_vma; - -static int __init gate_vma_init(void) -{ - if (!FIXADDR_USER_START) - return 0; - - gate_vma.vm_mm = NULL; - gate_vma.vm_start = FIXADDR_USER_START; - gate_vma.vm_end = FIXADDR_USER_END; - gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC; - gate_vma.vm_page_prot = __P101; - - /* - * Make sure the vDSO gets into every core dump. - * Dumping its contents makes post-mortem fully interpretable later - * without matching up the same kernel and hardware config to see - * what PC values meant. - */ - gate_vma.vm_flags |= VM_ALWAYSDUMP; - - return 0; -} -__initcall(gate_vma_init); - -struct vm_area_struct *get_gate_vma(struct mm_struct *mm) -{ - return FIXADDR_USER_START ? &gate_vma : NULL; -} - -int in_gate_area_no_mm(unsigned long addr) -{ - if (!FIXADDR_USER_START) - return 0; - - if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END)) - return 1; - - return 0; -} - -int in_gate_area(struct mm_struct *mm, unsigned long addr) -{ - struct vm_area_struct *vma = get_gate_vma(mm); - - if (!vma) - return 0; - - return (addr >= vma->vm_start) && (addr < vma->vm_end); -} |