diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2022-02-28 10:53:34 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-03-08 00:33:00 +0100 |
commit | 1952954569d1907eaf6df4b15bb23969e57b6599 (patch) | |
tree | 7d2a3ea6852a68fc5b8178146a4fc3361c07c9d9 /arch/s390/mm/fault.c | |
parent | a156f09c9063bc6c11502fc49a6d006489f25eb3 (diff) |
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>
Diffstat (limited to 'arch/s390/mm/fault.c')
-rw-r--r-- | arch/s390/mm/fault.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index ff16ce0d04ee..1336541103e7 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -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) |