]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
x86_64: prepare shared mm/mmap.c
authorThomas Gleixner <tglx@linutronix.de>
Thu, 11 Oct 2007 09:16:12 +0000 (11:16 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Oct 2007 09:16:12 +0000 (11:16 +0200)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86_64/mm/Makefile
arch/x86_64/mm/mmap.c [deleted file]
arch/x86_64/mm/mmap_64.c [new file with mode: 0644]

index 1e2ccf009d4c399f780087ecd08228a633f9abbb..a7fedc9cbb0526893a86a91f59f30bee7796d0f2 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the linux x86_64-specific parts of the memory manager.
 #
 
-obj-y   := init_64.o fault.o ioremap_64.o extable.o pageattr.o mmap.o
+obj-y   := init_64.o fault.o ioremap_64.o extable.o pageattr.o mmap_64.o
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_NUMA) += numa.o
 obj-$(CONFIG_K8_NUMA) += k8topology.o
diff --git a/arch/x86_64/mm/mmap.c b/arch/x86_64/mm/mmap.c
deleted file mode 100644 (file)
index 80bba0d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2005 Andi Kleen, SuSE Labs.
- * Licensed under GPL, v.2
- */
-#include <linux/mm.h>
-#include <linux/sched.h>
-#include <linux/random.h>
-#include <asm/ia32.h>
-
-/* Notebook: move the mmap code from sys_x86_64.c over here. */
-
-void arch_pick_mmap_layout(struct mm_struct *mm)
-{
-#ifdef CONFIG_IA32_EMULATION
-       if (current_thread_info()->flags & _TIF_IA32)
-               return ia32_pick_mmap_layout(mm);
-#endif
-       mm->mmap_base = TASK_UNMAPPED_BASE;
-       if (current->flags & PF_RANDOMIZE) {
-               /* Add 28bit randomness which is about 40bits of address space
-                  because mmap base has to be page aligned.
-                  or ~1/128 of the total user VM
-                  (total user address space is 47bits) */
-               unsigned rnd = get_random_int() & 0xfffffff;
-               mm->mmap_base += ((unsigned long)rnd) << PAGE_SHIFT;
-       }
-       mm->get_unmapped_area = arch_get_unmapped_area;
-       mm->unmap_area = arch_unmap_area;
-}
-
diff --git a/arch/x86_64/mm/mmap_64.c b/arch/x86_64/mm/mmap_64.c
new file mode 100644 (file)
index 0000000..80bba0d
--- /dev/null
@@ -0,0 +1,29 @@
+/* Copyright 2005 Andi Kleen, SuSE Labs.
+ * Licensed under GPL, v.2
+ */
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/random.h>
+#include <asm/ia32.h>
+
+/* Notebook: move the mmap code from sys_x86_64.c over here. */
+
+void arch_pick_mmap_layout(struct mm_struct *mm)
+{
+#ifdef CONFIG_IA32_EMULATION
+       if (current_thread_info()->flags & _TIF_IA32)
+               return ia32_pick_mmap_layout(mm);
+#endif
+       mm->mmap_base = TASK_UNMAPPED_BASE;
+       if (current->flags & PF_RANDOMIZE) {
+               /* Add 28bit randomness which is about 40bits of address space
+                  because mmap base has to be page aligned.
+                  or ~1/128 of the total user VM
+                  (total user address space is 47bits) */
+               unsigned rnd = get_random_int() & 0xfffffff;
+               mm->mmap_base += ((unsigned long)rnd) << PAGE_SHIFT;
+       }
+       mm->get_unmapped_area = arch_get_unmapped_area;
+       mm->unmap_area = arch_unmap_area;
+}
+