Skip to content

Commit 1952954

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/extable: search amode31 extable last
It is very unlikely that an exception happens within the amode31 text section, therefore safe a couple of cycles for the common case, and search the amode31 extable last. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent a156f09 commit 1952954

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

arch/s390/mm/fault.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,13 @@ static noinline void do_sigsegv(struct pt_regs *regs, int si_code)
230230
const struct exception_table_entry *s390_search_extables(unsigned long addr)
231231
{
232232
const struct exception_table_entry *fixup;
233+
size_t num;
233234

234-
fixup = search_extable(__start_amode31_ex_table,
235-
__stop_amode31_ex_table - __start_amode31_ex_table,
236-
addr);
237-
if (!fixup)
238-
fixup = search_exception_tables(addr);
239-
return fixup;
235+
fixup = search_exception_tables(addr);
236+
if (fixup)
237+
return fixup;
238+
num = __stop_amode31_ex_table - __start_amode31_ex_table;
239+
return search_extable(__start_amode31_ex_table, num, addr);
240240
}
241241

242242
static noinline void do_no_context(struct pt_regs *regs)

0 commit comments

Comments
 (0)