From c559b6fdd148b28358862c68d835e67dab997080 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 11 Oct 2007 11:16:15 +0200 Subject: x86_64: prepare shared mm/extable.c Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- arch/x86_64/mm/Makefile | 2 +- arch/x86_64/mm/extable.c | 34 ---------------------------------- arch/x86_64/mm/extable_64.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 arch/x86_64/mm/extable.c create mode 100644 arch/x86_64/mm/extable_64.c (limited to 'arch/x86_64') diff --git a/arch/x86_64/mm/Makefile b/arch/x86_64/mm/Makefile index 921b756..7dbe4f9 100644 --- a/arch/x86_64/mm/Makefile +++ b/arch/x86_64/mm/Makefile @@ -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 index 79ac6e7..0000000 --- a/arch/x86_64/mm/extable.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * linux/arch/x86_64/mm/extable.c - */ - -#include -#include -#include -#include - -/* 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 index 0000000..79ac6e7 --- /dev/null +++ b/arch/x86_64/mm/extable_64.c @@ -0,0 +1,34 @@ +/* + * linux/arch/x86_64/mm/extable.c + */ + +#include +#include +#include +#include + +/* 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; +} -- cgit v1.1