Skip to content

Commit 0741ec1

Browse files
hcahcaVasily Gorbik
authored andcommitted
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>
1 parent d09a307 commit 0741ec1

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

arch/s390/mm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66
obj-y := init.o fault.o extmem.o mmap.o vmem.o maccess.o
7-
obj-y += page-states.o pageattr.o pgtable.o pgalloc.o
7+
obj-y += page-states.o pageattr.o pgtable.o pgalloc.o extable.o
88

99
obj-$(CONFIG_CMM) += cmm.o
1010
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o

arch/s390/mm/extable.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
3+
#include <linux/extable.h>
4+
#include <asm/extable.h>
5+
6+
const struct exception_table_entry *s390_search_extables(unsigned long addr)
7+
{
8+
const struct exception_table_entry *fixup;
9+
size_t num;
10+
11+
fixup = search_exception_tables(addr);
12+
if (fixup)
13+
return fixup;
14+
num = __stop_amode31_ex_table - __start_amode31_ex_table;
15+
return search_extable(__start_amode31_ex_table, num, addr);
16+
}

arch/s390/mm/fault.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -228,18 +228,6 @@ static noinline void do_sigsegv(struct pt_regs *regs, int si_code)
228228
(void __user *)(regs->int_parm_long & __FAIL_ADDR_MASK));
229229
}
230230

231-
const struct exception_table_entry *s390_search_extables(unsigned long addr)
232-
{
233-
const struct exception_table_entry *fixup;
234-
size_t num;
235-
236-
fixup = search_exception_tables(addr);
237-
if (fixup)
238-
return fixup;
239-
num = __stop_amode31_ex_table - __start_amode31_ex_table;
240-
return search_extable(__start_amode31_ex_table, num, addr);
241-
}
242-
243231
static noinline void do_no_context(struct pt_regs *regs)
244232
{
245233
const struct exception_table_entry *fixup;

0 commit comments

Comments
 (0)