]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
x86_64: prepare shared mm/extable.c
authorThomas Gleixner <tglx@linutronix.de>
Thu, 11 Oct 2007 09:16:15 +0000 (11:16 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Oct 2007 09:16:15 +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/extable.c [deleted file]
arch/x86_64/mm/extable_64.c [new file with mode: 0644]

index 921b756ed7c01607ee6976d4de2730133f195909..7dbe4f9f57b6373c3e1e5bd949426dcbc24b9203 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_64.o
+obj-y   := init_64.o fault.o ioremap_64.o extable_64.o pageattr.o mmap_64.o
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_NUMA) += numa_64.o
 obj-$(CONFIG_K8_NUMA) += k8topology.o
diff --git a/arch/x86_64/mm/extable.c b/arch/x86_64/mm/extable.c
deleted file mode 100644 (file)
index 79ac6e7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * linux/arch/x86_64/mm/extable.c
- */
-
-#include <linux/module.h>
-#include <linux/spinlock.h>
-#include <linux/init.h>
-#include <asm/uaccess.h>
-
-/* Simple binary search */
-const struct exception_table_entry *
-search_extable(const struct exception_table_entry *first,
-              const struct exception_table_entry *last,
-              unsigned long value)
-{
-       /* Work around a B stepping K8 bug */
-       if ((value >> 32) == 0)
-               value |= 0xffffffffUL << 32; 
-
-        while (first <= last) {
-               const struct exception_table_entry *mid;
-               long diff;
-
-               mid = (last - first) / 2 + first;
-               diff = mid->insn - value;
-                if (diff == 0)
-                        return mid;
-                else if (diff < 0)
-                        first = mid+1;
-                else
-                        last = mid-1;
-        }
-        return NULL;
-}
diff --git a/arch/x86_64/mm/extable_64.c b/arch/x86_64/mm/extable_64.c
new file mode 100644 (file)
index 0000000..79ac6e7
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * linux/arch/x86_64/mm/extable.c
+ */
+
+#include <linux/module.h>
+#include <linux/spinlock.h>
+#include <linux/init.h>
+#include <asm/uaccess.h>
+
+/* Simple binary search */
+const struct exception_table_entry *
+search_extable(const struct exception_table_entry *first,
+              const struct exception_table_entry *last,
+              unsigned long value)
+{
+       /* Work around a B stepping K8 bug */
+       if ((value >> 32) == 0)
+               value |= 0xffffffffUL << 32; 
+
+        while (first <= last) {
+               const struct exception_table_entry *mid;
+               long diff;
+
+               mid = (last - first) / 2 + first;
+               diff = mid->insn - value;
+                if (diff == 0)
+                        return mid;
+                else if (diff < 0)
+                        first = mid+1;
+                else
+                        last = mid-1;
+        }
+        return NULL;
+}