diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2022-02-28 11:37:52 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-03-08 00:33:00 +0100 |
commit | 0741ec112ca67ea95dc8158a7bc7547ae36cbecc (patch) | |
tree | 847df5dad27d57a007bc5f643132272ac493ad4e /arch/s390/mm | |
parent | d09a307fde1c943d23ccb9fecc9a0e1a569732ad (diff) |
s390/extable: move extable related functions to mm/extable.c
Just like arm64, riscv, and x86 move extable related functions to
mm/extable.c. This is currently only one function, but this will
change with subsequent changes.
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')
-rw-r--r-- | arch/s390/mm/Makefile | 2 | ||||
-rw-r--r-- | arch/s390/mm/extable.c | 16 | ||||
-rw-r--r-- | arch/s390/mm/fault.c | 12 |
3 files changed, 17 insertions, 13 deletions
diff --git a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile index cd67e94c16aa..57e4f3a24829 100644 --- a/arch/s390/mm/Makefile +++ b/arch/s390/mm/Makefile @@ -4,7 +4,7 @@ # obj-y := init.o fault.o extmem.o mmap.o vmem.o maccess.o -obj-y += page-states.o pageattr.o pgtable.o pgalloc.o +obj-y += page-states.o pageattr.o pgtable.o pgalloc.o extable.o obj-$(CONFIG_CMM) += cmm.o obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o diff --git a/arch/s390/mm/extable.c b/arch/s390/mm/extable.c new file mode 100644 index 000000000000..a4eb3d8aae7b --- /dev/null +++ b/arch/s390/mm/extable.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/extable.h> +#include <asm/extable.h> + +const struct exception_table_entry *s390_search_extables(unsigned long addr) +{ + const struct exception_table_entry *fixup; + size_t num; + + 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); +} diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index adaf5f5c9a45..caa4ab0ff80a 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -228,18 +228,6 @@ static noinline void do_sigsegv(struct pt_regs *regs, int si_code) (void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK)); } -const struct exception_table_entry *s390_search_extables(unsigned long addr) -{ - const struct exception_table_entry *fixup; - size_t num; - - 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) { const struct exception_table_entry *fixup; |