From 160c2d70e7f146cea087ae3cf9382d171e6c8eb6 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 20 Jan 2004 03:17:40 -0800 Subject: [PATCH] [PATCH] do not use shared extable code for ia64 From: Jes Sorensen The new sort_extable and shared search_extable code doesn't work on ia64. I have introduced two new #defines that archs can define to avoid the common code being built. ARCH_HAS_SEARCH_EXTABLE and ARCH_HAS_SORT_EXTABLE. --- include/asm-ia64/uaccess.h | 3 +++ lib/extable.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/asm-ia64/uaccess.h b/include/asm-ia64/uaccess.h index 9bd9e3f0c48e4..8e1feee4ea5d0 100644 --- a/include/asm-ia64/uaccess.h +++ b/include/asm-ia64/uaccess.h @@ -281,6 +281,9 @@ extern unsigned long __strnlen_user (const char *, long); __su_ret; \ }) +#define ARCH_HAS_SORT_EXTABLE +#define ARCH_HAS_SEARCH_EXTABLE + struct exception_table_entry { int addr; /* gp-relative address of insn this fixup is for */ int cont; /* gp-relative continuation address; if bit 2 is set, r9 is set to 0 */ diff --git a/lib/extable.c b/lib/extable.c index f95c5b0987722..57dc4333e217a 100644 --- a/lib/extable.c +++ b/lib/extable.c @@ -18,6 +18,7 @@ extern struct exception_table_entry __start___ex_table[]; extern struct exception_table_entry __stop___ex_table[]; +#ifndef ARCH_HAS_SORT_EXTABLE /* * The exception table needs to be sorted so that the binary * search that we use to find entries in it works properly. @@ -45,7 +46,9 @@ void sort_extable(struct exception_table_entry *start, } } } +#endif +#ifndef ARCH_HAS_SEARCH_EXTABLE /* * Search one exception table for an entry corresponding to the * given instruction address, and return the address of the entry, @@ -75,3 +78,4 @@ search_extable(const struct exception_table_entry *first, } return NULL; } +#endif -- 2.53.0