Skip to content

Commit d09a307

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/extable: move EX_TABLE define to asm-extable.h
Follow arm64 and riscv and move the EX_TABLE define to asm-extable.h which is a lot less generic than the current linkage.h. Also make sure that all files which contain EX_TABLE usages actually include the new header file. This should make sure that the files always compile and there won't be any random compile breakage due to other header file dependencies. 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 1952954 commit d09a307

30 files changed

Lines changed: 49 additions & 19 deletions

arch/s390/hypfs/hypfs_vm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/errno.h>
1111
#include <linux/string.h>
1212
#include <linux/vmalloc.h>
13+
#include <asm/extable.h>
1314
#include <asm/diag.h>
1415
#include <asm/ebcdic.h>
1516
#include <asm/timex.h>

arch/s390/include/asm/ap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define _ASM_S390_AP_H_
1414

1515
#include <linux/io.h>
16+
#include <asm/asm-extable.h>
1617

1718
/**
1819
* The ap_qid_t identifier of an ap queue.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef __ASM_EXTABLE_H
3+
#define __ASM_EXTABLE_H
4+
5+
#include <linux/stringify.h>
6+
#include <asm/asm-const.h>
7+
8+
#define __EX_TABLE(_section, _fault, _target) \
9+
stringify_in_c(.section _section,"a";) \
10+
stringify_in_c(.align 8;) \
11+
stringify_in_c(.long (_fault) - .;) \
12+
stringify_in_c(.long (_target) - .;) \
13+
stringify_in_c(.quad 0;) \
14+
stringify_in_c(.previous)
15+
16+
#define EX_TABLE(_fault, _target) \
17+
__EX_TABLE(__ex_table, _fault, _target)
18+
#define EX_TABLE_AMODE31(_fault, _target) \
19+
__EX_TABLE(.amode31.ex_table, _fault, _target)
20+
21+
#endif /* __ASM_EXTABLE_H */

arch/s390/include/asm/cpu_mf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define _ASM_S390_CPU_MF_H
1111

1212
#include <linux/errno.h>
13+
#include <asm/asm-extable.h>
1314
#include <asm/facility.h>
1415

1516
asm(".include \"asm/cpu_mf-insn.h\"\n");

arch/s390/include/asm/diag.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <linux/if_ether.h>
1313
#include <linux/percpu.h>
14+
#include <asm/asm-extable.h>
1415

1516
enum diag_stat_enum {
1617
DIAG_STAT_X008,

arch/s390/include/asm/fpu/api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#define _ASM_S390_FPU_API_H
4646

4747
#include <linux/preempt.h>
48+
#include <asm/asm-extable.h>
4849

4950
void save_fpu_regs(void);
5051
void load_fpu_regs(void);

arch/s390/include/asm/futex.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <linux/uaccess.h>
66
#include <linux/futex.h>
7+
#include <asm/asm-extable.h>
78
#include <asm/mmu_context.h>
89
#include <asm/errno.h>
910

arch/s390/include/asm/linkage.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,9 @@
22
#ifndef __ASM_LINKAGE_H
33
#define __ASM_LINKAGE_H
44

5-
#include <asm/asm-const.h>
65
#include <linux/stringify.h>
76

87
#define __ALIGN .align 16, 0x07
98
#define __ALIGN_STR __stringify(__ALIGN)
109

11-
/*
12-
* Helper macro for exception table entries
13-
*/
14-
15-
#define __EX_TABLE(_section, _fault, _target) \
16-
stringify_in_c(.section _section,"a";) \
17-
stringify_in_c(.align 8;) \
18-
stringify_in_c(.long (_fault) - .;) \
19-
stringify_in_c(.long (_target) - .;) \
20-
stringify_in_c(.quad 0;) \
21-
stringify_in_c(.previous)
22-
23-
#define EX_TABLE(_fault, _target) \
24-
__EX_TABLE(__ex_table, _fault, _target)
25-
#define EX_TABLE_AMODE31(_fault, _target) \
26-
__EX_TABLE(.amode31.ex_table, _fault, _target)
27-
2810
#endif

arch/s390/include/asm/mmu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <linux/cpumask.h>
66
#include <linux/errno.h>
7+
#include <asm/asm-extable.h>
78

89
typedef struct {
910
spinlock_t lock;

arch/s390/include/asm/uaccess.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/*
1414
* User space memory access functions
1515
*/
16+
#include <asm/asm-extable.h>
1617
#include <asm/processor.h>
1718
#include <asm/ctl_reg.h>
1819
#include <asm/extable.h>

0 commit comments

Comments
 (0)