Skip to content

Commit

Permalink
s390/extable: search amode31 extable last
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
  • Loading branch information
hcahca authored and Vasily Gorbik committed Mar 7, 2022
1 parent a156f09 commit 1952954
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/s390/mm/fault.c
Original file line number Diff line number Diff line change
@@ -230,13 +230,13 @@ static noinline void do_sigsegv(struct pt_regs *regs, int si_code)
const struct exception_table_entry *s390_search_extables(unsigned long addr)
{
const struct exception_table_entry *fixup;
size_t num;

fixup = search_extable(__start_amode31_ex_table,
__stop_amode31_ex_table - __start_amode31_ex_table,
addr);
if (!fixup)
fixup = search_exception_tables(addr);
return fixup;
fixup = search_exception_tables(addr);
if (fixup)
return fixup;
num = __stop_amode31_ex_table - __start_amode31_ex_table;
return search_extable(__start_amode31_ex_table, num, addr);
}

static noinline void do_no_context(struct pt_regs *regs)

0 comments on commit 1952954

Please sign in to comment.