Skip to content

Commit c1ae1b4

Browse files
hcahcazx2c4
authored andcommitted
s390/vdso: Move vdso symbol handling to separate header file
The vdso.h header file, which is included at many places, includes generated header files. This can easily lead to recursive header file inclusions if the vdso code is changed. Therefore move the vdso symbol code, which requires the generated header files, to a separate header file, and include it at the two locations which require it. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent e10863f commit c1ae1b4

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

arch/s390/include/asm/vdso-symbols.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef __S390_VDSO_SYMBOLS_H__
3+
#define __S390_VDSO_SYMBOLS_H__
4+
5+
#include <generated/vdso64-offsets.h>
6+
#ifdef CONFIG_COMPAT
7+
#include <generated/vdso32-offsets.h>
8+
#endif
9+
10+
#define VDSO64_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso64_offset_##name))
11+
#ifdef CONFIG_COMPAT
12+
#define VDSO32_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso32_offset_##name))
13+
#else
14+
#define VDSO32_SYMBOL(tsk, name) (-1UL)
15+
#endif
16+
17+
#endif /* __S390_VDSO_SYMBOLS_H__ */

arch/s390/include/asm/vdso.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66

77
#ifndef __ASSEMBLY__
88

9-
#include <generated/vdso64-offsets.h>
10-
#ifdef CONFIG_COMPAT
11-
#include <generated/vdso32-offsets.h>
12-
#endif
13-
14-
#define VDSO64_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso64_offset_##name))
15-
#ifdef CONFIG_COMPAT
16-
#define VDSO32_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso32_offset_##name))
17-
#else
18-
#define VDSO32_SYMBOL(tsk, name) (-1UL)
19-
#endif
20-
219
extern struct vdso_data *vdso_data;
2210

2311
int vdso_getcpu_init(void);

arch/s390/kernel/compat_signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
#include <linux/tty.h>
2525
#include <linux/personality.h>
2626
#include <linux/binfmts.h>
27+
#include <asm/vdso-symbols.h>
2728
#include <asm/access-regs.h>
2829
#include <asm/ucontext.h>
2930
#include <linux/uaccess.h>
3031
#include <asm/lowcore.h>
31-
#include <asm/vdso.h>
3232
#include <asm/fpu.h>
3333
#include "compat_linux.h"
3434
#include "compat_ptrace.h"

arch/s390/kernel/signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#include <linux/compat.h>
3131
#include <asm/ucontext.h>
3232
#include <linux/uaccess.h>
33+
#include <asm/vdso-symbols.h>
3334
#include <asm/access-regs.h>
3435
#include <asm/lowcore.h>
35-
#include <asm/vdso.h>
3636
#include "entry.h"
3737

3838
/*

0 commit comments

Comments
 (0)